Commit 29929b74 authored by Sulfyderz's avatar Sulfyderz
Browse files

[Error Update]:Updating the matching parameters from ShowCollection.

parent 3b570574
......@@ -5174,6 +5174,7 @@ class Show(object):
clusterAffLocal=copy.deepcopy(clusterAff)
#Récupérer les segments qui matchent avec le segment ref selectionné et effectuer les post-traitements nécessaires.
## Gère les createBoundary.
valueMatchRaw=Diar()
toRename=Diar()
for y in value:
......
......@@ -182,12 +182,12 @@ class ShowCollection(object):
## refNoOverlap: utiliser la reference brut ou la reference sans overlap
## tolerance: tolerance a appliquer aux segment boundaries
## uem: apply or not the uem
def createActionsDualHumanCorrectionFromDiarHacBic(self,modeTranscriber=False,uem=True,actionsIncremental=False,delimitedOverlapMode=True,refNoOverlap=False,tolerance=0,diarActionsHumanCorrection__clusterToDeleteAccordingToDiarRef={},diarIncrementalActionsHumanCorrection=False,indexIncremental=False,deleteBoundarySameConsecutiveSpk=False):
def createActionsDualHumanCorrectionFromDiarHacBic(self,modeTranscriber=False,uem=True,actionsIncremental=False,delimitedOverlapMode=True,refNoOverlap=False,tolerance=0,diarActionsHumanCorrection__clusterToDeleteAccordingToDiarRef={},diarIncrementalActionsHumanCorrection=False,indexIncremental=False,deleteBoundarySameConsecutiveSpk=False,deleteBoundaryMergeCluster=False):
for i in self.stock:
if len(diarActionsHumanCorrection__clusterToDeleteAccordingToDiarRef)!=0 and 'filenameSrc' in i.__dict__ and i.filenameSrc in diarActionsHumanCorrection__clusterToDeleteAccordingToDiarRef:
i.createActionsDualHumanCorrectionFromDiarHacBic(modeTranscriber=modeTranscriber,uem=uem,actionsIncremental=actionsIncremental,delimitedOverlapMode=delimitedOverlapMode,refNoOverlap=refNoOverlap,tolerance=tolerance,diarActionsHumanCorrection__clusterToDeleteAccordingToDiarRef=diarActionsHumanCorrection__clusterToDeleteAccordingToDiarRef[i.filenameSrc],diarIncrementalActionsHumanCorrection=diarIncrementalActionsHumanCorrection,indexIncremental=indexIncremental,deleteBoundarySameConsecutiveSpk=deleteBoundarySameConsecutiveSpk)
i.createActionsDualHumanCorrectionFromDiarHacBic(modeTranscriber=modeTranscriber,uem=uem,actionsIncremental=actionsIncremental,delimitedOverlapMode=delimitedOverlapMode,refNoOverlap=refNoOverlap,tolerance=tolerance,diarActionsHumanCorrection__clusterToDeleteAccordingToDiarRef=diarActionsHumanCorrection__clusterToDeleteAccordingToDiarRef[i.filenameSrc],diarIncrementalActionsHumanCorrection=diarIncrementalActionsHumanCorrection,indexIncremental=indexIncremental,deleteBoundarySameConsecutiveSpk=deleteBoundarySameConsecutiveSpk,deleteBoundaryMergeCluster=deleteBoundaryMergeCluster)
else:
i.createActionsDualHumanCorrectionFromDiarHacBic(modeTranscriber=modeTranscriber,uem=uem,actionsIncremental=actionsIncremental,delimitedOverlapMode=delimitedOverlapMode,refNoOverlap=refNoOverlap,tolerance=tolerance,diarActionsHumanCorrection__clusterToDeleteAccordingToDiarRef={},diarIncrementalActionsHumanCorrection=diarIncrementalActionsHumanCorrection,indexIncremental=indexIncremental,deleteBoundarySameConsecutiveSpk=deleteBoundarySameConsecutiveSpk)
i.createActionsDualHumanCorrectionFromDiarHacBic(modeTranscriber=modeTranscriber,uem=uem,actionsIncremental=actionsIncremental,delimitedOverlapMode=delimitedOverlapMode,refNoOverlap=refNoOverlap,tolerance=tolerance,diarActionsHumanCorrection__clusterToDeleteAccordingToDiarRef={},diarIncrementalActionsHumanCorrection=diarIncrementalActionsHumanCorrection,indexIncremental=indexIncremental,deleteBoundarySameConsecutiveSpk=deleteBoundarySameConsecutiveSpk,deleteBoundaryMergeCluster=deleteBoundaryMergeCluster)
# Creer les temps des actions assignments correction sur le corpus
def createActionsAssignmentHumanAssistedCorrectionTimeCorpus(self,uem=True):
......@@ -287,13 +287,13 @@ class ShowCollection(object):
## refNoOverlap: utiliser la reference brut ou la reference sans overlap
## actionsTime: recuperer les temps des actions
## uem: apply or not the uem
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=True,viterbi__applyUem=True,viterbi__jumpOverSegmentsWithDuration=None,viterbi__MetaData__FirstModel=False,viterbi__giveBackControlToUser=False,viterbi__window=None,viterbi__window__emission=False,viterbi__exit_penalties=[-250],viterbi__setUpSad=False,viterbi__loop_penalties=[0],viterbi__adjustBoundaries=False,viterbi__adjustBoundaries__pack=True,viterbi__noSpeech=False,viterbi__overlapIntoAccount=False,viterbi__toleranceIntoAccount=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=True,viterbi__applyUem=True,viterbi__jumpOverSegmentsWithDuration=None,viterbi__MetaData__FirstModel=False,viterbi__giveBackControlToUser=False,viterbi__window=None,viterbi__window__emission=False,viterbi__exit_penalties=[-250],viterbi__setUpSad=False,viterbi__loop_penalties=[0],viterbi__adjustBoundaries=False,viterbi__adjustBoundaries__pack=True,viterbi__noSpeech=False,viterbi__overlapIntoAccount=False,viterbi__toleranceIntoAccount=True,verbose=False,indexIncremental=False,deleteBoundarySameConsecutiveSpk=False,deleteBoundaryMergeCluster=False):
assert isinstance(diarActionsHumanAssistedCorrection__clusterToDeleteAccordingToDiarRef,dict)
for i in self.stock:
if len(diarActionsHumanAssistedCorrection__clusterToDeleteAccordingToDiarRef)!=0 and 'filenameSrc' in i.__dict__ and i.filenameSrc in diarActionsHumanAssistedCorrection__clusterToDeleteAccordingToDiarRef:
i.createActionsDualHumanAssistedCorrectionFromDiarHacBic(boundaryRollingMean=boundaryRollingMean,boundaryRollingMean__winSize=boundaryRollingMean__winSize,boundaryRollingMean__maxSegSize=boundaryRollingMean__maxSegSize,boundaryRollingMean__securityMarginSize=boundaryRollingMean__securityMarginSize,keepBoundary=keepBoundary,modeTranscriber=modeTranscriber,uem=uem,constrainedClustering=constrainedClustering,constrainedClustering__verbose=constrainedClustering__verbose,actionsIncremental=actionsIncremental,diarActionsHumanAssistedCorrection__clusterToDeleteAccordingToDiarRef=diarActionsHumanAssistedCorrection__clusterToDeleteAccordingToDiarRef[i.filenameSrc],diarIncrementalActionsHumanAssistedCorrection=diarIncrementalActionsHumanAssistedCorrection,delimitedOverlapMode=delimitedOverlapMode,refNoOverlap=refNoOverlap,tolerance=tolerance,actionsTime=actionsTime,reassignment__thr=reassignment__thr,reassignment__sr=reassignment__sr,reassignment__unifyReferenceModels=reassignment__unifyReferenceModels,reassignment__unifyReferenceModels__weighed=reassignment__unifyReferenceModels__weighed,reassignment__overlapIntoAccount=reassignment__overlapIntoAccount,reassignment__toleranceIntoAccount=reassignment__toleranceIntoAccount,viterbi=viterbi,viterbi__applyUem=viterbi__applyUem,viterbi__jumpOverSegmentsWithDuration=viterbi__jumpOverSegmentsWithDuration,viterbi__MetaData__FirstModel=viterbi__MetaData__FirstModel,viterbi__giveBackControlToUser=viterbi__giveBackControlToUser,viterbi__window=viterbi__window,viterbi__window__emission=viterbi__window__emission,viterbi__exit_penalties=viterbi__exit_penalties,viterbi__setUpSad=viterbi__setUpSad,viterbi__loop_penalties=viterbi__loop_penalties,viterbi__adjustBoundaries=viterbi__adjustBoundaries,viterbi__adjustBoundaries__pack=viterbi__adjustBoundaries__pack,viterbi__noSpeech=viterbi__noSpeech,viterbi__overlapIntoAccount=viterbi__overlapIntoAccount,viterbi__toleranceIntoAccount=viterbi__toleranceIntoAccount,verbose=verbose,indexIncremental=indexIncremental,deleteBoundarySameConsecutiveSpk=deleteBoundarySameConsecutiveSpk)
i.createActionsDualHumanAssistedCorrectionFromDiarHacBic(boundaryRollingMean=boundaryRollingMean,boundaryRollingMean__winSize=boundaryRollingMean__winSize,boundaryRollingMean__maxSegSize=boundaryRollingMean__maxSegSize,boundaryRollingMean__securityMarginSize=boundaryRollingMean__securityMarginSize,keepBoundary=keepBoundary,modeTranscriber=modeTranscriber,uem=uem,constrainedClustering=constrainedClustering,constrainedClustering__verbose=constrainedClustering__verbose,actionsIncremental=actionsIncremental,diarActionsHumanAssistedCorrection__clusterToDeleteAccordingToDiarRef=diarActionsHumanAssistedCorrection__clusterToDeleteAccordingToDiarRef[i.filenameSrc],diarIncrementalActionsHumanAssistedCorrection=diarIncrementalActionsHumanAssistedCorrection,delimitedOverlapMode=delimitedOverlapMode,refNoOverlap=refNoOverlap,tolerance=tolerance,actionsTime=actionsTime,reassignment__thr=reassignment__thr,reassignment__sr=reassignment__sr,reassignment__unifyReferenceModels=reassignment__unifyReferenceModels,reassignment__unifyReferenceModels__weighed=reassignment__unifyReferenceModels__weighed,reassignment__overlapIntoAccount=reassignment__overlapIntoAccount,reassignment__toleranceIntoAccount=reassignment__toleranceIntoAccount,viterbi=viterbi,viterbi__applyUem=viterbi__applyUem,viterbi__jumpOverSegmentsWithDuration=viterbi__jumpOverSegmentsWithDuration,viterbi__MetaData__FirstModel=viterbi__MetaData__FirstModel,viterbi__giveBackControlToUser=viterbi__giveBackControlToUser,viterbi__window=viterbi__window,viterbi__window__emission=viterbi__window__emission,viterbi__exit_penalties=viterbi__exit_penalties,viterbi__setUpSad=viterbi__setUpSad,viterbi__loop_penalties=viterbi__loop_penalties,viterbi__adjustBoundaries=viterbi__adjustBoundaries,viterbi__adjustBoundaries__pack=viterbi__adjustBoundaries__pack,viterbi__noSpeech=viterbi__noSpeech,viterbi__overlapIntoAccount=viterbi__overlapIntoAccount,viterbi__toleranceIntoAccount=viterbi__toleranceIntoAccount,verbose=verbose,indexIncremental=indexIncremental,deleteBoundarySameConsecutiveSpk=deleteBoundarySameConsecutiveSpk,deleteBoundaryMergeCluster=deleteBoundaryMergeCluster)
else:
i.createActionsDualHumanAssistedCorrectionFromDiarHacBic(boundaryRollingMean=boundaryRollingMean,boundaryRollingMean__winSize=boundaryRollingMean__winSize,boundaryRollingMean__maxSegSize=boundaryRollingMean__maxSegSize,boundaryRollingMean__securityMarginSize=boundaryRollingMean__securityMarginSize,keepBoundary=keepBoundary,modeTranscriber=modeTranscriber,uem=uem,constrainedClustering=constrainedClustering,constrainedClustering__verbose=constrainedClustering__verbose,actionsIncremental=actionsIncremental,diarActionsHumanAssistedCorrection__clusterToDeleteAccordingToDiarRef={},diarIncrementalActionsHumanAssistedCorrection=diarIncrementalActionsHumanAssistedCorrection,delimitedOverlapMode=delimitedOverlapMode,refNoOverlap=refNoOverlap,tolerance=tolerance,actionsTime=actionsTime,reassignment__thr=reassignment__thr,reassignment__sr=reassignment__sr,reassignment__unifyReferenceModels=reassignment__unifyReferenceModels,reassignment__unifyReferenceModels__weighed=reassignment__unifyReferenceModels__weighed,reassignment__overlapIntoAccount=reassignment__overlapIntoAccount,reassignment__toleranceIntoAccount=reassignment__toleranceIntoAccount,viterbi__exit_penalties=viterbi__exit_penalties,viterbi__setUpSad=viterbi__setUpSad,viterbi=viterbi,viterbi__applyUem=viterbi__applyUem,viterbi__jumpOverSegmentsWithDuration=viterbi__jumpOverSegmentsWithDuration,viterbi__MetaData__FirstModel=viterbi__MetaData__FirstModel,viterbi__giveBackControlToUser=viterbi__giveBackControlToUser,viterbi__window=viterbi__window,viterbi__window__emission=viterbi__window__emission,viterbi__loop_penalties=viterbi__loop_penalties,viterbi__adjustBoundaries=viterbi__adjustBoundaries,viterbi__adjustBoundaries__pack=viterbi__adjustBoundaries__pack,viterbi__noSpeech=viterbi__noSpeech,viterbi__overlapIntoAccount=viterbi__overlapIntoAccount,viterbi__toleranceIntoAccount=viterbi__toleranceIntoAccount,verbose=verbose,indexIncremental=indexIncremental,deleteBoundarySameConsecutiveSpk=deleteBoundarySameConsecutiveSpk)
i.createActionsDualHumanAssistedCorrectionFromDiarHacBic(boundaryRollingMean=boundaryRollingMean,boundaryRollingMean__winSize=boundaryRollingMean__winSize,boundaryRollingMean__maxSegSize=boundaryRollingMean__maxSegSize,boundaryRollingMean__securityMarginSize=boundaryRollingMean__securityMarginSize,keepBoundary=keepBoundary,modeTranscriber=modeTranscriber,uem=uem,constrainedClustering=constrainedClustering,constrainedClustering__verbose=constrainedClustering__verbose,actionsIncremental=actionsIncremental,diarActionsHumanAssistedCorrection__clusterToDeleteAccordingToDiarRef={},diarIncrementalActionsHumanAssistedCorrection=diarIncrementalActionsHumanAssistedCorrection,delimitedOverlapMode=delimitedOverlapMode,refNoOverlap=refNoOverlap,tolerance=tolerance,actionsTime=actionsTime,reassignment__thr=reassignment__thr,reassignment__sr=reassignment__sr,reassignment__unifyReferenceModels=reassignment__unifyReferenceModels,reassignment__unifyReferenceModels__weighed=reassignment__unifyReferenceModels__weighed,reassignment__overlapIntoAccount=reassignment__overlapIntoAccount,reassignment__toleranceIntoAccount=reassignment__toleranceIntoAccount,viterbi__exit_penalties=viterbi__exit_penalties,viterbi__setUpSad=viterbi__setUpSad,viterbi=viterbi,viterbi__applyUem=viterbi__applyUem,viterbi__jumpOverSegmentsWithDuration=viterbi__jumpOverSegmentsWithDuration,viterbi__MetaData__FirstModel=viterbi__MetaData__FirstModel,viterbi__giveBackControlToUser=viterbi__giveBackControlToUser,viterbi__window=viterbi__window,viterbi__window__emission=viterbi__window__emission,viterbi__loop_penalties=viterbi__loop_penalties,viterbi__adjustBoundaries=viterbi__adjustBoundaries,viterbi__adjustBoundaries__pack=viterbi__adjustBoundaries__pack,viterbi__noSpeech=viterbi__noSpeech,viterbi__overlapIntoAccount=viterbi__overlapIntoAccount,viterbi__toleranceIntoAccount=viterbi__toleranceIntoAccount,verbose=verbose,indexIncremental=indexIncremental,deleteBoundarySameConsecutiveSpk=deleteBoundarySameConsecutiveSpk,deleteBoundaryMergeCluster=deleteBoundaryMergeCluster)
# Pour chaque show: compte le nombre d'actions pour la correction sans Assisted (sans remise en question de la diarization apres chaque correction utilisateur)
def createActionsAssignmentHumanCorrectionCounter(self,average=False,modeTranscriber=False):
......
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