LAAC-LSCP / ChildProject

Python package for the management of day-long recordings of children.
https://childproject.readthedocs.io
MIT License
13 stars 5 forks source link

eaf-builder import annotations speaker_id NA #438

Closed LoannPeurey closed 1 year ago

LoannPeurey commented 1 year ago

Is your feature request related to a problem? Please describe. The eaf-builder when used with import-annotations is trying to use the speaker_id to give a tier name, and if speaker_id does not exist, uses speaker_type. But a rpoblem arises if speaker_id exists but is NA, as the NA value will be used for the tier name instead of trying to use speaker_type

Describe the solution you'd like check that speaker_id exists and is not null before using it to name the tier

LoannPeurey commented 1 year ago

https://github.com/LAAC-LSCP/ChildProject/blob/e284d2b7a2da6621f91ad613b45b5ad685cf0201/ChildProject/pipelines/eafbuilder.py#L68

to be replaced by :

if "speaker_id" in segment and not pd.isnull(segment["speaker_id"]):
MichaBiriuchinskii commented 1 year ago
  1. I have to create a branch
  2. I have to commit the changes
  3. I have to run the tests
  4. Create the pull request