Commit 46fbdb59 authored by Sulfyderz's avatar Sulfyderz
Browse files

[Error Update]:Improving the automaton methods from Show.

parent 32886abe
Pipeline #559 canceled with stages
......@@ -1511,7 +1511,7 @@ class Show(object):
listTmp.append(y)
elif tolerance!=0 and y['start']>=(valueRef['start']-tolerance):
listTmp.append(y)
if not (not deleteBoundarySameConsecutiveSpk and listTmp[0]['cluster']==listTmp[1]['cluster']):
if not (not deleteBoundarySameConsecutiveSpk and listTmp[0]['cluster']==listTmp[1]['cluster'] and listTmp[1]['cluster']==valueRef['cluster']):
actionsSegmentationBoundaryMergeThr.append(copy.deepcopy([listTmp[0],listTmp[1]]))
if actionsIncremental:
actionsIncrementalSegmentationBoundaryMergeThrTurn.append(copy.deepcopy([listTmp[0],listTmp[1]]))
......@@ -1525,7 +1525,7 @@ class Show(object):
if not (Segment.intersection(newSegment,listTmp[y]) is not None or newSegment["stop"]==listTmp[y]["start"] or newSegment["start"]==listTmp[y]["stop"]):
logging.error("Cannot have absence of a segment in Transcriber mode.")
raise Exception("Absence of a segment.")
if not (not deleteBoundarySameConsecutiveSpk and newSegment['cluster']==listTmp[y]['cluster']):
if not (not deleteBoundarySameConsecutiveSpk and newSegment['cluster']==listTmp[y]['cluster'] and listTmp[y]['cluster']==valueRef['cluster']):
actionsSegmentationBoundaryMergeThr.append(copy.deepcopy([newSegment,listTmp[y]]))
if actionsIncremental:
actionsIncrementalSegmentationBoundaryMergeThrTurn.append(copy.deepcopy([newSegment,listTmp[y]]))
......@@ -2416,7 +2416,7 @@ class Show(object):
listTmp.append(y)
elif tolerance!=0 and y['start']>=(valueRef['start']-tolerance):
listTmp.append(y)
if not (not deleteBoundarySameConsecutiveSpk and listTmp[0]['cluster']==listTmp[1]['cluster']):
if not (not deleteBoundarySameConsecutiveSpk and listTmp[0]['cluster']==listTmp[1]['cluster'] and listTmp[1]['cluster']==valueRef['cluster']):
actionsSegmentationBoundaryMergeThr.append(copy.deepcopy([listTmp[0],listTmp[1]]))
if actionsIncremental:
actionsIncrementalSegmentationBoundaryMergeThrTurn.append(copy.deepcopy([listTmp[0],listTmp[1]]))
......@@ -2430,7 +2430,7 @@ class Show(object):
if not (Segment.intersection(newSegment,listTmp[y]) is not None or newSegment["stop"]==listTmp[y]["start"] or newSegment["start"]==listTmp[y]["stop"]):
logging.error("Cannot have absence of a segment in Transcriber mode.")
raise Exception("Absence of a segment.")
if not (not deleteBoundarySameConsecutiveSpk and newSegment['cluster']==listTmp[y]['cluster']):
if not (not deleteBoundarySameConsecutiveSpk and newSegment['cluster']==listTmp[y]['cluster'] and listTmp[y]['cluster']==valueRef['cluster']):
actionsSegmentationBoundaryMergeThr.append(copy.deepcopy([newSegment,listTmp[y]]))
if actionsIncremental:
actionsIncrementalSegmentationBoundaryMergeThrTurn.append(copy.deepcopy([newSegment,listTmp[y]]))
......@@ -3090,7 +3090,7 @@ class Show(object):
listTmp.append(y)
elif tolerance!=0 and y['start']>=(valueRef['start']-tolerance):
listTmp.append(y)
if not (not deleteBoundarySameConsecutiveSpk and listTmp[0]['cluster']==listTmp[1]['cluster']):
if not (not deleteBoundarySameConsecutiveSpk and listTmp[0]['cluster']==listTmp[1]['cluster'] and listTmp[0]['cluster']==valueRef['cluster']):
actionsSegmentationBoundaryMergeThr.append(copy.deepcopy([listTmp[0],listTmp[1]]))
if actionsIncremental:
actionsIncrementalSegmentationBoundaryMergeThrTurn.append(copy.deepcopy([listTmp[0],listTmp[1]]))
......@@ -3104,7 +3104,7 @@ class Show(object):
if not (Segment.intersection(newSegment,listTmp[y]) is not None or newSegment["stop"]==listTmp[y]["start"] or newSegment["start"]==listTmp[y]["stop"]):
logging.error("Cannot have absence of a segment in Transcriber mode.")
raise Exception("Absence of a segment.")
if not (not deleteBoundarySameConsecutiveSpk and newSegment['cluster']==listTmp[y]['cluster']):
if not (not deleteBoundarySameConsecutiveSpk and newSegment['cluster']==listTmp[y]['cluster'] and listTmp[y]['cluster']==valueRef['cluster']):
actionsSegmentationBoundaryMergeThr.append(copy.deepcopy([newSegment,listTmp[y]]))
if actionsIncremental:
actionsIncrementalSegmentationBoundaryMergeThrTurn.append(copy.deepcopy([newSegment,listTmp[y]]))
......@@ -4077,7 +4077,7 @@ class Show(object):
listTmp.append(y)
elif tolerance!=0 and y['start']>=(valueRef['start']-tolerance):
listTmp.append(y)
if not (not deleteBoundarySameConsecutiveSpk and listTmp[0]['cluster']==listTmp[1]['cluster']):
if not (not deleteBoundarySameConsecutiveSpk and listTmp[0]['cluster']==listTmp[1]['cluster'] and listTmp[0]['cluster']==valueRef['cluster']):
actionsSegmentationBoundaryMergeThr.append(copy.deepcopy([listTmp[0],listTmp[1]]))
if actionsIncremental:
actionsIncrementalSegmentationBoundaryMergeThrTurn.append(copy.deepcopy([listTmp[0],listTmp[1]]))
......@@ -4091,7 +4091,7 @@ class Show(object):
if not (Segment.intersection(newSegment,listTmp[y]) is not None or newSegment["stop"]==listTmp[y]["start"] or newSegment["start"]==listTmp[y]["stop"]):
logging.error("Cannot have absence of a segment in Transcriber mode.")
raise Exception("Absence of a segment.")
if not (not deleteBoundarySameConsecutiveSpk and newSegment['cluster']==listTmp[y]['cluster']):
if not (not deleteBoundarySameConsecutiveSpk and newSegment['cluster']==listTmp[y]['cluster'] and listTmp[y]['cluster']==valueRef['cluster']):
actionsSegmentationBoundaryMergeThr.append(copy.deepcopy([newSegment,listTmp[y]]))
if actionsIncremental:
actionsIncrementalSegmentationBoundaryMergeThrTurn.append(copy.deepcopy([newSegment,listTmp[y]]))
......
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