annotations.Overlaps package

Submodules

annotations.Overlaps.overspeech module

filename

sppas.src.annotations.Overlaps.overspeech.py

author

Brigitte Bigi

contact

develop@sppas.org

summary

Package for the configuration of SPPAS.

class annotations.Overlaps.overspeech.OverActivity(ignore=())[source]

Bases: object

Search for overlapped activities.

__init__(ignore=())[source]

Create a new instance.

Parameters

ignore – (list of sppasTag) List of tags to ignore.

overlaps(act1, act2)[source]

Return a tier with overlapped activities of given tiers.

It is supposed that the given tiers have only one label in each annotation. Only its best tag is compared.

Parameters
  • act1 – (sppasTier) Input tier

  • act2 – (sppasTier) Input tier

Returns

(sppasTier)

exception annotations.Overlaps.overspeech.sppasLabelValueError(data_name, value)[source]

Bases: ValueError

:ERROR 1300:.

{:s} only supports annotations with one label but the annotation has {:d} labels.

__init__(data_name, value)[source]
get_status()[source]
property status

annotations.Overlaps.sppasoverlaps module

filename

sppas.src.annotations.Overlaps.sppasoverlaps.py

author

Brigitte Bigi

contact

develop@sppas.org

summary

SPPAS integration of the overlaps automatic annotation

class annotations.Overlaps.sppasoverlaps.sppasOverActivity(log=None)[source]

Bases: annotations.baseannot.sppasBaseAnnotation

SPPAS integration of the automatic overlaps estimator on intervals.

__init__(log=None)[source]

Create a new instance.

Parameters

log – (sppasLog) Human-readable logs.

detection(tier_spk1, tier_spk2)[source]

Search for the overlaps of annotations.

Parameters
  • tier_spk1 – (sppasTier)

  • tier_spk2 – (sppasTier)

fix_options(options)[source]

Fix all options.

Parameters

options – (sppasOption)

get_input_patterns()[source]

Pattern this annotation expects for its input filename.

get_inputs(input_files)[source]

Return 2 tiers with name given in options.

Parameters

input_files – (list)

Raise

NoTierInputError

Returns

(sppasTier)

get_output_pattern()[source]

Pattern this annotation uses in an output filename.

run(input_files, output=None)[source]

Run the automatic annotation process on an input.

Input files is a list with 2 files: the activity of speaker 1 and the activity of the speaker 2.

Parameters
  • input_files – (list of str) Time-aligned items, Time-aligned items

  • output – (str) the output name

Returns

(sppasTranscription)

set_default_out_items()[source]

Set the list of tags to be ignored.

set_out_items(str_entry)[source]

Fix the list of tags to be ignored from the given string.

Parameters

str_entry – (str) Entries separated by commas

set_tiername(tier_name)[source]

Fix the tiername option.

Parameters

tier_name – (str)

Module contents

filename

sppas.src.annotations.Overlaps.__init__.py

author

Brigitte Bigi

contact

develop@sppas.org

summary

Package for the configuration of SPPAS.

class annotations.Overlaps.OverActivity(ignore=())[source]

Bases: object

Search for overlapped activities.

__init__(ignore=())[source]

Create a new instance.

Parameters

ignore – (list of sppasTag) List of tags to ignore.

overlaps(act1, act2)[source]

Return a tier with overlapped activities of given tiers.

It is supposed that the given tiers have only one label in each annotation. Only its best tag is compared.

Parameters
  • act1 – (sppasTier) Input tier

  • act2 – (sppasTier) Input tier

Returns

(sppasTier)

class annotations.Overlaps.sppasOverActivity(log=None)[source]

Bases: annotations.baseannot.sppasBaseAnnotation

SPPAS integration of the automatic overlaps estimator on intervals.

__init__(log=None)[source]

Create a new instance.

Parameters

log – (sppasLog) Human-readable logs.

detection(tier_spk1, tier_spk2)[source]

Search for the overlaps of annotations.

Parameters
  • tier_spk1 – (sppasTier)

  • tier_spk2 – (sppasTier)

fix_options(options)[source]

Fix all options.

Parameters

options – (sppasOption)

get_input_patterns()[source]

Pattern this annotation expects for its input filename.

get_inputs(input_files)[source]

Return 2 tiers with name given in options.

Parameters

input_files – (list)

Raise

NoTierInputError

Returns

(sppasTier)

get_output_pattern()[source]

Pattern this annotation uses in an output filename.

run(input_files, output=None)[source]

Run the automatic annotation process on an input.

Input files is a list with 2 files: the activity of speaker 1 and the activity of the speaker 2.

Parameters
  • input_files – (list of str) Time-aligned items, Time-aligned items

  • output – (str) the output name

Returns

(sppasTranscription)

set_default_out_items()[source]

Set the list of tags to be ignored.

set_out_items(str_entry)[source]

Fix the list of tags to be ignored from the given string.

Parameters

str_entry – (str) Entries separated by commas

set_tiername(tier_name)[source]

Fix the tiername option.

Parameters

tier_name – (str)