Commit b9771802 authored by Florent Desnous 's avatar Florent Desnous
Browse files

Update fixed bug + added logging

parent b974f805
import logging
import copy
from s4d.diar import Diar, Segment
from s4d.scoring import DER
......@@ -93,23 +94,23 @@ def diar_diff(hyp, ref, match=True, inter=False, collar=25):
ref.add_attribut('color', (0.6, 0.0, 0.0, 1.0))
diar = Diar()
der = DER(hyp, ref)
assign, not_assign = der.assignment()
add_match(ref, hyp, assign, not_assign)
if match:
add_match(ref, hyp, assign, not_assign)
add_prefix(ref, 'REF: ')
add_prefix(hyp, 'HYP: ')
diar = copy.deepcopy(ref)
if inter:
print('append intersection')'append intersection')
diar.append_diar(add_intersection(ref, hyp, assign))
if collar > 0:
print('append collar')
logging('append collar')
add_collar(diar, collar)
return diar
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment