Commit 8f86d0ce authored by Sulfyderz's avatar Sulfyderz
Browse files

Test: ON

parent 34cfd385
......@@ -3862,6 +3862,7 @@ class Show(object):
# si 1 alors affectation + move bound si besoin/et ou create bound sur stop
# si > 1 alors affectation + move bound si besoin/et ou create bound sur stop + merge
else:
print("SAME IN:",DiarTools.sameDiar(valueTmp,diarRef))
# verifie que la valueRef ne se trouve pas recouvert par la tolerance
if not DiarTools.segmentExistsAccordingToTolerance(valueRef,tolerance):
for z in listHypRefSegment:
......@@ -3966,7 +3967,6 @@ class Show(object):
elif tolerance!=0 and y['start']>=(valueRef['start']-tolerance):
listIndexHypRefSegment.append(idx)
print("SAME IN:",DiarTools.sameDiar(valueTmp,diarRef))
for idx,z in enumerate(listIndexHypRefSegment):
# partie affectation
applyChange=False
......@@ -3974,7 +3974,6 @@ class Show(object):
# si en presence d'un segment overlap et si la "not reassignment__overlapIntoAccount" est vrai alors on ne prend pas en compte les segments dans la réaffectation auto
if not reassignment__overlapIntoAccount and DiarTools.segmentWithinDiar(valueRef,diarOverlapArea):
if valueTmp[z]['cluster'] in actionsAssignmentCreateThrBis:
print("BAD CREATE overlap")
dictionary[copy.deepcopy(valueRef['cluster'])]='speakerManualOverlap'+str(cpt+1)
actionsAssignmentCreateThrBis.append('speakerManualOverlap'+str(cpt+1))
actionsAssignmentCreateThr.append([copy.deepcopy(valueRef['cluster']),'speakerManualOverlap'+str(cpt+1),copy.deepcopy(valueTmp[z])])
......@@ -3983,7 +3982,6 @@ class Show(object):
applyChange=True
cpt+=1
else:
print("GOOD CREATE overlap")
dictionary[copy.deepcopy(valueRef['cluster'])]=copy.deepcopy(valueTmp[z]['cluster'])
actionsAssignmentCreateThrBis.append(copy.deepcopy(valueTmp[z]['cluster']))
actionsAssignmentCreateThr.append(copy.deepcopy([valueRef['cluster'],valueTmp[z]['cluster'],copy.deepcopy(valueTmp[z])]))
......@@ -3991,7 +3989,6 @@ class Show(object):
actionsIncrementalAssignmentCreateThrTurn.append(copy.deepcopy([valueRef['cluster'],valueTmp[z]['cluster'],copy.deepcopy(valueTmp[z])]))
else:
if valueTmp[z]['cluster'] in actionsAssignmentCreateThrBis:
print("BAD CREATE")
valueTmpBis=valueTmp
if not reassignment__toleranceIntoAccount:
......@@ -4117,8 +4114,7 @@ class Show(object):
# MAJ du cluster vu qu'on a repris les segments checked initiaux sans changement du cluster en cours
valueTmp[z]['cluster']=clusterTmp
else:
print("GOOD CREATE")
dictionary[copy.deepcopy(valueRef['cluster'])]=copy.deepcopy(valueTmp[z]['cluster'])
actionsAssignmentCreateThrBis.append(copy.deepcopy(valueTmp[z]['cluster']))
actionsAssignmentCreateThr.append(copy.deepcopy([valueRef['cluster'],valueTmp[z]['cluster'],copy.deepcopy(valueTmp[z])]))
......@@ -4131,7 +4127,6 @@ class Show(object):
if actionsIncremental:
actionsIncrementalAssignmentNothingThrTurn.append(copy.deepcopy(valueTmp[z]))
else:
print("CHANGE:",valueTmp[z]['cluster'],dictionary[valueRef['cluster']])
if (modeTranscriber == True and idx==0) or (modeTranscriber == False):
actionsAssignmentChangeThr.append(copy.deepcopy([dictionary[valueRef['cluster']],valueTmp[z]]))
if actionsIncremental:
......@@ -4165,7 +4160,7 @@ class Show(object):
reassignment__thrValue=reassignment__thr
else:
reassignment__thrValue=key
print("2")
if not constrainedClustering:
if actionsTime:
t1=time.time()
......@@ -4282,7 +4277,7 @@ class Show(object):
valueTmp.append_seg(segmentTmp)
valueTmp.sort()
print("SAME OUT:",DiarTools.sameDiar(valueTmp,diarRef))
if not perfectBoundary:
# recupere les segments nouveaux, modifiés par les etapes precedentes.
......@@ -4385,6 +4380,7 @@ class Show(object):
if actionsIncremental:
actionsIncrementalSegmentationBoundaryMergeThrTurn.append(copy.deepcopy([newSegment,listTmp[y]]))
newSegment,valueTmp=DiarTools.mergeSegment(newSegment,listTmp[y],valueTmp)
print("SAME OUT:",DiarTools.sameDiar(valueTmp,diarRef))
# MAJ diar
value=valueTmp
......
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