annotations.LexMetric package¶
Submodules¶
annotations.LexMetric.occrank module¶
- filename
sppas.src.annotations.LexMetric.occrank.py
- author
Brigitte Bigi
- contact
- summary
Part the LexMetric automatic annotation for occurrences and ranks.
- class annotations.LexMetric.occrank.OccRank(tier, alt=True)[source]¶
Bases:
object
A class to estimate occurrences and ranks of items of a tier.
- __init__(tier, alt=True)[source]¶
Create an instance of OccRank.
- Parameters
tier – (sppasTier)
alt – (bool) Use alternative tags to estimate counts and rank
- occ()[source]¶
Return a tier with occurrences of all labels.
- Example
input: the | little | little | cat output: 1 | 2 | 2 | 1
annotations.LexMetric.sppaslexmetric module¶
- filename
sppas.src.annotations.LexMetric.sppaslexmetric.py
- author
Brigitte Bigi
- contact
- summary
SPPAS integration of the LexMetric automatic annotation.
- class annotations.LexMetric.sppaslexmetric.sppasLexMetric(log=None)[source]¶
Bases:
annotations.baseannot.sppasBaseAnnotation
SPPAS integration of the occ and rank estimator.
- __init__(log=None)[source]¶
Create a new sppasLexMetric instance.
- Parameters
log – (sppasLog) Human-readable logs.
- get_input_tier(input_files)[source]¶
Return the input tier from the inputs.
- Parameters
input_files – (list)
- run(input_files, output=None)[source]¶
Run the automatic annotation process on an input.
- Parameters
input_files – (list of str) Time-aligned tokens, or other
output – (str) the output file name
- Returns
(sppasTranscription)
Module contents¶
- filename
sppas.src.annotations.LexMetric.__init__.py
- author
Brigitte Bigi
- contact
- summary
Lexical metrics automatic annotation.