All timeslot values deteled in ELAN

Hi all,

I have been using pympi (http://dopefishh.github.io/pympi/Elan.html) to write python code to automatically generate annotation boxes below the transcriptions, and gloss each word using a digital dictionary which we have produced. This worked fine until we started filling in the free translations. After doing this, saving and closing the file, the file will no longer open. Looking at the log and the .eaf in a text editor revealed that both time_slot_ref1 and time_slot_ref2 have been changed to the empty string, for all annotations. I was able to reproduce this problem when I regenerated the glosses and then tried to alter the file in ELAN.

Has anyone experienced this behavior before? I have one theory - the pympi code I wrote may have produced some overlapping annotations on the same tier. Could this be the source of the problem? If this matters, I’m on the ubuntu version.

Thanks in advance

Gus

Just to be sure, the free translations are filled in in ELAN? So it is possible to open the file in ELAN after the update by the Python script, but after editing in ELAN the file is damaged?
If that is the case it might be good to have a look in the log (View->View Log…) after opening the updated file in ELAN, maybe there are error messages there.
Otherwise the only way to say anything about this is probably to have a look at the eaf before and after the update by the Python script.

-Han

Hi all,

I am running into the same problem. After running the python code, I am able to open de .eaf files and edit them. However, after I save the files, I am not able to open them anymore. It appears that the time_slot_ref1 and ref2 have been changed to empty strings.

The log of the update eaf file indeed gives some error messages:
Error: cvc-attribute.3: The value ‘’ of attribute ‘TIME_SLOT_REF1’ on element ‘ALIGNABLE_ANNOTATION’ is not valid with respect to its type, ‘IDREF’.
Error: cvc-datatype-valid.1.2.1: ‘’ is not a valid value for ‘NCName’.
Error: cvc-attribute.3: The value ‘’ of attribute ‘TIME_SLOT_REF2’ on element ‘ALIGNABLE_ANNOTATION’ is not valid with respect to its type, ‘IDREF’.

Do you have any idea how to solve this?

Best,
Ferdy

Hi,

After running the Python code and before opening and editing the result in ELAN, can you try the File->Validate EAF file… function of ELAN on the generated eaf file? To see if there are errors or inconsistencies in the file?

-Han

Hi Han,

Below you’ll find the output of the validation. It indeed gives some errors. Do you know how I could solve this issue?

Ferdy

++ Start of XML validation by SAXParser

Resolved schema to local resource: /mpi/eudico/resources/EAFv2.8.xsd

Received 0 warnings and 0 errors
– End of XML validation by SAXParser

Checking contents of the EAF file
++ Start of Tier Types (a.k.a. Linguistic Types)
– End of Tier Types
++ Start of Tiers
Checking tier: GlossL S1
Checking tier: GlossL S2
Checking tier: GlossR S1
Checking tier: GlossR S2
Checking tier: MeaningL S1
Checking tier: MeaningL S2
Checking tier: MeaningR S1
Checking tier: MeaningR S2
Checking tier: Mouth S1
Checking tier: Mouth S2
Checking tier: MouthAdd S1
Checking tier: MouthAdd S2
Checking tier: MouthLemma S1
Checking tier: MouthLemma S2
Checking tier: MouthSpr S1
Checking tier: MouthSpr S2
Checking tier: MouthType S1 A1
ERROR: the tier “MouthType S1 A1” contains 177 alignable annotations not consistent with tier stereotype “Symbolic_Association”
Checking tier: MouthType S2 A1
ERROR: the tier “MouthType S2 A1” contains 230 alignable annotations not consistent with tier stereotype “Symbolic_Association”
Checking tier: TranslationNarrow S1
Checking tier: TranslationNarrow S2
Checking tier: Example
Checking tier: MouthPOS S1 A1
ERROR: the tier “MouthPOS S1 A1” contains 177 alignable annotations not consistent with tier stereotype “Symbolic_Association”
Checking tier: MouthPOS S2 A1
ERROR: the tier “MouthPOS S2 A1” contains 230 alignable annotations not consistent with tier stereotype “Symbolic_Association”
Checking tier: MouthPOS S1 A2
ERROR: the tier “MouthPOS S1 A2” contains 177 alignable annotations not consistent with tier stereotype “Symbolic_Association”
Checking tier: MouthPOS S2 A2
ERROR: the tier “MouthPOS S2 A2” contains 230 alignable annotations not consistent with tier stereotype “Symbolic_Association”
Checking tier: MouthPOS S1 C
ERROR: the tier “MouthPOS S1 C” contains 177 alignable annotations not consistent with tier stereotype “Symbolic_Association”
Checking tier: MouthPOS S2 C
ERROR: the tier “MouthPOS S2 C” contains 230 alignable annotations not consistent with tier stereotype “Symbolic_Association”
Checking tier: MouthType S1 A2
ERROR: the tier “MouthType S1 A2” contains 177 alignable annotations not consistent with tier stereotype “Symbolic_Association”
Checking tier: MouthType S2 A2
ERROR: the tier “MouthType S2 A2” contains 230 alignable annotations not consistent with tier stereotype “Symbolic_Association”
Checking tier: MouthType S1 C
ERROR: the tier “MouthType S1 C” contains 177 alignable annotations not consistent with tier stereotype “Symbolic_Association”
Checking tier: MouthType S2 C
ERROR: the tier “MouthType S2 C” contains 230 alignable annotations not consistent with tier stereotype “Symbolic_Association”
– End of Tiers
++ Start of Controlled Vocabularies
– End of Controlled Vocabularies

Hi Ferdy,

The errors indicate that annotations on one-to-one related depending tiers (i.e. of type "Symbolic Association) contain alignable annotations (should be reference annotations, “REF_ANNOTATION” in the eaf).
Did you use pympi to create the (depending) tiers as well as the annotations or only to generate the annotations? Maybe you used wrong arguments when running the code to generate the tiers and/or the annotations? (I’m not too familiar with the options for pympi).

I think I just managed to solve the problem. In the original python code I added annotations to a child tier using the add_annotation function instead of using the add_ref_annotation function. I changed the code and now it works. The error messages are gone and I am able to edit and save the file and open it in ELAN afterwards.