Commit 3b570574 authored by Sulfyderz's avatar Sulfyderz
Browse files

[New]:Adding a new parameter "deleteBoundaryMergeCluster" to methods dual.

parent 4590bd5b
...@@ -2547,8 +2547,8 @@ class Show(object): ...@@ -2547,8 +2547,8 @@ class Show(object):
# WARNING: LE CAS OU LA DIARHACBIC (OU DIARREF) CONTIENT DES ZONES OVERLAP NON DELIMITE N A PAS ETE FAIT. NE MARCHE QUE AVEC DES ZONES OVERLAP DELIMITE # WARNING: LE CAS OU LA DIARHACBIC (OU DIARREF) CONTIENT DES ZONES OVERLAP NON DELIMITE N A PAS ETE FAIT. NE MARCHE QUE AVEC DES ZONES OVERLAP DELIMITE
## delimitedOverlapMode: Pour savoir si on travaille avec des references et hypotheses qui contiennent des overlap délimité (overlap delimité = 1 segment qui represente une zone overlap) ## delimitedOverlapMode: Pour savoir si on travaille avec des references et hypotheses qui contiennent des overlap délimité (overlap delimité = 1 segment qui represente une zone overlap)
## refNoOverlap: utiliser la reference brut ou la reference sans overlap ## refNoOverlap: utiliser la reference brut ou la reference sans overlap
def createActionsDualHumanCorrectionFromDiarHacBic(self,modeTranscriber=False,uem=True,delimitedOverlapMode=True,refNoOverlap=False,tolerance=0,actionsIncremental=False,diarActionsHumanCorrection__clusterToDeleteAccordingToDiarRef={},diarIncrementalActionsHumanCorrection=False,indexIncremental=False,deleteBoundarySameConsecutiveSpk=False): def createActionsDualHumanCorrectionFromDiarHacBic(self,modeTranscriber=False,uem=True,delimitedOverlapMode=True,refNoOverlap=False,tolerance=0,actionsIncremental=False,diarActionsHumanCorrection__clusterToDeleteAccordingToDiarRef={},diarIncrementalActionsHumanCorrection=False,indexIncremental=False,deleteBoundarySameConsecutiveSpk=False,deleteBoundaryMergeCluster=False):
assert isinstance(deleteBoundarySameConsecutiveSpk,bool) and isinstance(modeTranscriber,bool) and isinstance(actionsIncremental,bool) and isinstance(uem,bool) and isinstance(refNoOverlap,bool) and isinstance(delimitedOverlapMode,bool) and isinstance(tolerance,numbers.Number) and isinstance(diarActionsHumanCorrection__clusterToDeleteAccordingToDiarRef,dict) and isinstance(diarIncrementalActionsHumanCorrection,bool) and isinstance(indexIncremental,bool) assert isinstance(deleteBoundaryMergeCluster,bool) and isinstance(deleteBoundarySameConsecutiveSpk,bool) and isinstance(modeTranscriber,bool) and isinstance(actionsIncremental,bool) and isinstance(uem,bool) and isinstance(refNoOverlap,bool) and isinstance(delimitedOverlapMode,bool) and isinstance(tolerance,numbers.Number) and isinstance(diarActionsHumanCorrection__clusterToDeleteAccordingToDiarRef,dict) and isinstance(diarIncrementalActionsHumanCorrection,bool) and isinstance(indexIncremental,bool)
for s in diarActionsHumanCorrection__clusterToDeleteAccordingToDiarRef: for s in diarActionsHumanCorrection__clusterToDeleteAccordingToDiarRef:
assert isinstance(s,numbers.Number) assert isinstance(s,numbers.Number)
assert isinstance(diarActionsHumanCorrection__clusterToDeleteAccordingToDiarRef[s],list) assert isinstance(diarActionsHumanCorrection__clusterToDeleteAccordingToDiarRef[s],list)
...@@ -3049,6 +3049,9 @@ class Show(object): ...@@ -3049,6 +3049,9 @@ class Show(object):
valueTmp.append_seg(segmentTmp) valueTmp.append_seg(segmentTmp)
valueTmp.sort() valueTmp.sort()
if deleteBoundaryMergeCluster:
break
if not perfectBoundary: if not perfectBoundary:
# recupere les segments nouveaux, modifiés par les etapes precedentes. # recupere les segments nouveaux, modifiés par les etapes precedentes.
listHypRefSegment=list() listHypRefSegment=list()
...@@ -3240,8 +3243,8 @@ class Show(object): ...@@ -3240,8 +3243,8 @@ class Show(object):
## delimitedOverlapMode: Pour savoir si on travaille avec des references et hypotheses qui contiennent des overlap (si present) délimité (overlap delimité = 1 segment qui represente une zone overlap) ## delimitedOverlapMode: Pour savoir si on travaille avec des references et hypotheses qui contiennent des overlap (si present) délimité (overlap delimité = 1 segment qui represente une zone overlap)
## refNoOverlap: utiliser la reference brut ou la reference sans overlap ## refNoOverlap: utiliser la reference brut ou la reference sans overlap
## actionsTime: recuperer les temps des actions ## actionsTime: recuperer les temps des actions
def createActionsDualHumanAssistedCorrectionFromDiarHacBic(self,boundaryRollingMean=False,boundaryRollingMean__winSize=100,boundaryRollingMean__maxSegSize=600,boundaryRollingMean__securityMarginSize=200,keepBoundary=False,modeTranscriber=False,uem=True,constrainedClustering=False,constrainedClustering__verbose=False,actionsIncremental=False,diarActionsHumanAssistedCorrection__clusterToDeleteAccordingToDiarRef={},diarIncrementalActionsHumanAssistedCorrection=False,delimitedOverlapMode=True,refNoOverlap=False,tolerance=0,actionsTime=False,reassignment__thr=None,reassignment__sr=False,reassignment__unifyReferenceModels=True,reassignment__unifyReferenceModels__weighed=False,reassignment__overlapIntoAccount=False,reassignment__toleranceIntoAccount=True,viterbi__window=None,viterbi__window__emission=False,viterbi__jumpOverSegmentsWithDuration=None,viterbi__giveBackControlToUser=False,viterbi__exit_penalties=[-250],viterbi__setUpSad=False,viterbi__applyUem=True,viterbi__loop_penalties=[0],viterbi__MetaData__FirstModel=False,viterbi__adjustBoundaries=False,viterbi__adjustBoundaries__pack=True,viterbi__noSpeech=False,viterbi__overlapIntoAccount=False,viterbi__toleranceIntoAccount=True,viterbi=True,verbose=False,indexIncremental=False,deleteBoundarySameConsecutiveSpk=False): def createActionsDualHumanAssistedCorrectionFromDiarHacBic(self,boundaryRollingMean=False,boundaryRollingMean__winSize=100,boundaryRollingMean__maxSegSize=600,boundaryRollingMean__securityMarginSize=200,keepBoundary=False,modeTranscriber=False,uem=True,constrainedClustering=False,constrainedClustering__verbose=False,actionsIncremental=False,diarActionsHumanAssistedCorrection__clusterToDeleteAccordingToDiarRef={},diarIncrementalActionsHumanAssistedCorrection=False,delimitedOverlapMode=True,refNoOverlap=False,tolerance=0,actionsTime=False,reassignment__thr=None,reassignment__sr=False,reassignment__unifyReferenceModels=True,reassignment__unifyReferenceModels__weighed=False,reassignment__overlapIntoAccount=False,reassignment__toleranceIntoAccount=True,viterbi__window=None,viterbi__window__emission=False,viterbi__jumpOverSegmentsWithDuration=None,viterbi__giveBackControlToUser=False,viterbi__exit_penalties=[-250],viterbi__setUpSad=False,viterbi__applyUem=True,viterbi__loop_penalties=[0],viterbi__MetaData__FirstModel=False,viterbi__adjustBoundaries=False,viterbi__adjustBoundaries__pack=True,viterbi__noSpeech=False,viterbi__overlapIntoAccount=False,viterbi__toleranceIntoAccount=True,viterbi=True,verbose=False,indexIncremental=False,deleteBoundarySameConsecutiveSpk=False,deleteBoundaryMergeCluster=False):
assert isinstance(deleteBoundarySameConsecutiveSpk,bool) and isinstance(boundaryRollingMean__winSize,numbers.Number) and isinstance(boundaryRollingMean__securityMarginSize,numbers.Number) and isinstance(boundaryRollingMean__maxSegSize,numbers.Number) and isinstance(boundaryRollingMean,bool) and isinstance(keepBoundary,bool) and isinstance(modeTranscriber,bool) and isinstance(viterbi,bool) and isinstance(constrainedClustering__verbose,bool) and isinstance(constrainedClustering,bool) and isinstance(actionsIncremental,bool) and isinstance(uem,bool) and isinstance(refNoOverlap,bool) and isinstance(diarActionsHumanAssistedCorrection__clusterToDeleteAccordingToDiarRef,dict) and isinstance(diarIncrementalActionsHumanAssistedCorrection,bool) and isinstance(actionsTime,bool) and isinstance(delimitedOverlapMode,bool) and isinstance(tolerance,numbers.Number) and isinstance(verbose,bool) and isinstance(indexIncremental,bool) assert isinstance(deleteBoundaryMergeCluster,bool) and isinstance(deleteBoundarySameConsecutiveSpk,bool) and isinstance(boundaryRollingMean__winSize,numbers.Number) and isinstance(boundaryRollingMean__securityMarginSize,numbers.Number) and isinstance(boundaryRollingMean__maxSegSize,numbers.Number) and isinstance(boundaryRollingMean,bool) and isinstance(keepBoundary,bool) and isinstance(modeTranscriber,bool) and isinstance(viterbi,bool) and isinstance(constrainedClustering__verbose,bool) and isinstance(constrainedClustering,bool) and isinstance(actionsIncremental,bool) and isinstance(uem,bool) and isinstance(refNoOverlap,bool) and isinstance(diarActionsHumanAssistedCorrection__clusterToDeleteAccordingToDiarRef,dict) and isinstance(diarIncrementalActionsHumanAssistedCorrection,bool) and isinstance(actionsTime,bool) and isinstance(delimitedOverlapMode,bool) and isinstance(tolerance,numbers.Number) and isinstance(verbose,bool) and isinstance(indexIncremental,bool)
for s in diarActionsHumanAssistedCorrection__clusterToDeleteAccordingToDiarRef: for s in diarActionsHumanAssistedCorrection__clusterToDeleteAccordingToDiarRef:
assert isinstance(s,numbers.Number) assert isinstance(s,numbers.Number)
assert isinstance(diarActionsHumanAssistedCorrection__clusterToDeleteAccordingToDiarRef[s],list) assert isinstance(diarActionsHumanAssistedCorrection__clusterToDeleteAccordingToDiarRef[s],list)
...@@ -4298,7 +4301,9 @@ class Show(object): ...@@ -4298,7 +4301,9 @@ class Show(object):
valueTmp=DiarTools.dropSegment(valueTmp[z],valueTmp) valueTmp=DiarTools.dropSegment(valueTmp[z],valueTmp)
valueTmp.append_seg(segmentTmp) valueTmp.append_seg(segmentTmp)
valueTmp.sort() valueTmp.sort()
if deleteBoundaryMergeCluster:
break
if not perfectBoundary: if not perfectBoundary:
......
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