dopefishh / pympi

A python module for processing ELAN and Praat annotation files
MIT License
93 stars 39 forks source link

Merging transcriptions and subtracting tiers #25

Closed Cogitarian closed 4 years ago

Cogitarian commented 4 years ago

I wonder how can I use pympi to merge two different eaf files. Would putting all tiers of each file together in a new file work? Has anybody tried that?

Substraction is more complicated: elan generates tier from Substraction (menu>tier>generate tier from Substraction), but I need to do it on 80 files, so again I wonder how can I use pympi for this?

I can generate tier1 from one file and tier2 from another as a dataframe, pympi object, then substract timestamps and add new tier to one of the files. Has anyone tried that?

Cogitarian commented 4 years ago

Moreover, duplicating tiers works fine, but changing linguistic type seems to be beyond pympi. Any suggestions?

dopefishh commented 4 years ago

I don't know the details of the subtraction function. It is probably possible to do this by hand by looping through the annotations of both tiers and generating new annotations for the new tier.

Your second point. The linguistic type determines the type of annotations in a tier. Converting this is not trivial. However, it can be done by hand by creating a new tier with the correct linguistic type and one by one copy the annotations to the new tier.