Skip to content

Compatibility with ACT R library #56

@lucientisserand

Description

@lucientisserand

Expected behaviour
The Pympi's exported ELAN file should be opened by the Annotated Corpus Toolkit (ACT) or should be formatted as original ELAN file.

Actual behaviour
The exported ELAN file should be able to be processed by ACT or should be formatted as original ELAN.

System information

  • python version: 3.10
  • os: Linux Mint 21.3
  • are you up to date with the latest master?: yes 1.70.2

Additional context
I work both with Pympi and Oliver Ehmer's Annotated Corpus Tollkit for R (ACT) that are too great pieces of code for linguists working with ELAN.
I noticed that the ELAN files exported with pympi (with or without "pretty" parameter) could not be processed directly by ACT (see below).
However, they can if this file has been opened then saved in ELAN.
So I took a look at diffs between the pympi's fresh export and the ELAN overwrite and found these two located issues when importing pympi file in ACT :

  1. the file would not be loaded at all : apparently this error is due to the EAF version statement of the file for the attribute xsi:noNamespaceSchemaLocation (3.0 will be loaded, not 2.8).
  2. if issue 1 is corrected (2.8>3.0), the file is loaded but then the time values are not found by ACT : however it works if the "space" character before the TIME_SLOT closing tag is removed.

Workaround found
If I bulk replace version number (2.8>3.0) and if I bulk remove the space character before every closing XML tag, then the file is successfully processed by ACT.
Since the original ELAN files are not formatted as such, I though it was more a "pympi" issue rather than an "ACT" issue.
So maybe some slight export modifications are welcome in pympi ?

Thank you for your work,
Lucien

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions