annotations.ReOccurrences package¶
Submodules¶
annotations.ReOccurrences.reoccset module¶
- filename
sppas.src.annotations.ReOccurrences.reoccset.py
- author
Brigitte Bigi
- contact
- summary
data structure for a set of re-occurrences.
- class annotations.ReOccurrences.reoccset.sppasAnnReOccSet[source]¶
Bases:
sppas.src.structs.basefset.sppasBaseSet
Manager for a set of re-occurrences annotations.
A sppasAnnReOccSet() manages a dictionary with:
key: an annotation
value: a list of re-occurring annotations
annotations.ReOccurrences.reoccurrences module¶
- filename
sppas.src.annotations.ReOccurrences.reoccurrences.py
- author
Brigitte Bigi
- contact
- summary
Re-Occurrences detection.
- class annotations.ReOccurrences.reoccurrences.ReOccurences[source]¶
Bases:
object
Manager for a set of re-occurrences annotations.
- static compare_labels(label1, label2)[source]¶
Compare two labels.
- Parameters
label1 – (sppasLabel)
label2 – (sppasLabel)
- Returns
(bool) Number of tags they have in common
- static eval(ann1, anns2)[source]¶
Return the list of re-occurrences.
An annotation in anns2 is matching ann1 if all labels of ann1 are in ann2. It is not one-to-one: some labels of ann2 could not match those of ann1.
- Parameters
ann1 – (sppasAnnotation)
anns2 – (list of sppasAnnotation)
- Returns
(list of sppasAnnotation)
annotations.ReOccurrences.sppasreocc module¶
- filename
sppas.src.annotations.ReOccurrences.sppasreocc.py
- author
Brigitte Bigi
- contact
- summary
SPPAS integration of ReOccurrences automatic annotation
- class annotations.ReOccurrences.sppasreocc.sppasReOcc(log=None)[source]¶
Bases:
annotations.baseannot.sppasBaseAnnotation
SPPAS integration of the automatic re-occurrences annotation.
- __init__(log=None)[source]¶
Create a new sppasReOcc instance with only the general rules.
- Parameters
log – (sppasLog) Human-readable logs.
- detection(tier_spk1, tier_spk2)[source]¶
Search for the re-occurrences of annotations.
- Parameters
tier_spk1 – (sppasTier)
tier_spk2 – (sppasTier)
- fix_options(options)[source]¶
Fix all options.
Available options are:
- Parameters
options – (sppasOption)
- get_inputs(input_files)[source]¶
Return 2 tiers with name given in options.
- Parameters
input_files – (list)
- Raise
NoTierInputError
- Returns
(sppasTier)
- run(input_files, output=None)[source]¶
Run the automatic annotation process on an input.
Input file is a tuple with 2 files: the main speaker and the echoing speaker.
- Parameters
input_files – (list of list of str) Time-aligned items, Time-aligned items
output – (str) the output name
- Returns
(sppasTranscription)
Module contents¶
- filename
sppas.src.annotations.ReOccurrences.__init__.py
- author
Brigitte Bigi
- contact
- summary
Re-Occurrences detection.
This annotation is searching for re-occurrences of an annotation of a speaker in the next N annotations of the interlocutor. It was originally used on annotation gestures in (M. Karpinski et al. 2018):
Maciej Karpinski, Katarzyna KlessaMethods, Tools and Techniques for Multimodal Analysis ofAccommodation in Intercultural CommunicationCMST 24(1) 29–41 (2018), DOI:10.12921/cmst.2018.0000006
- class annotations.ReOccurrences.ReOccurences[source]¶
Bases:
object
Manager for a set of re-occurrences annotations.
- static compare_labels(label1, label2)[source]¶
Compare two labels.
- Parameters
label1 – (sppasLabel)
label2 – (sppasLabel)
- Returns
(bool) Number of tags they have in common
- static eval(ann1, anns2)[source]¶
Return the list of re-occurrences.
An annotation in anns2 is matching ann1 if all labels of ann1 are in ann2. It is not one-to-one: some labels of ann2 could not match those of ann1.
- Parameters
ann1 – (sppasAnnotation)
anns2 – (list of sppasAnnotation)
- Returns
(list of sppasAnnotation)
- class annotations.ReOccurrences.sppasReOcc(log=None)[source]¶
Bases:
annotations.baseannot.sppasBaseAnnotation
SPPAS integration of the automatic re-occurrences annotation.
- __init__(log=None)[source]¶
Create a new sppasReOcc instance with only the general rules.
- Parameters
log – (sppasLog) Human-readable logs.
- detection(tier_spk1, tier_spk2)[source]¶
Search for the re-occurrences of annotations.
- Parameters
tier_spk1 – (sppasTier)
tier_spk2 – (sppasTier)
- fix_options(options)[source]¶
Fix all options.
Available options are:
- Parameters
options – (sppasOption)
- get_inputs(input_files)[source]¶
Return 2 tiers with name given in options.
- Parameters
input_files – (list)
- Raise
NoTierInputError
- Returns
(sppasTier)
- run(input_files, output=None)[source]¶
Run the automatic annotation process on an input.
Input file is a tuple with 2 files: the main speaker and the echoing speaker.
- Parameters
input_files – (list of list of str) Time-aligned items, Time-aligned items
output – (str) the output name
- Returns
(sppasTranscription)