Feature request: native support for referenced lexicon in interlinearization mode

Dear ELAN developers,

I would like to suggest a feature, which I believe would greatly improve the experience of the interlinearization mode, especially in collaborative documentation projects.

As of now, the lexicon module only works with ‘managed’ lexicon files. Opening an external lexicon.xml (e.g. stored in a shared git repo) creates a copy into the local preference directory, which it then uses for interlinearization. Further edits to the lexicon in ELAN are not automatically propagated to the original, nor are edits to the original updated to the local copy. This could easily lead to source-of-truth conflicts especially in collaborative work.

A workaround is to create a symbolic link to the external file and add it to the local preference directory, hence maintaining a single source of truth. However, this workaround does not seem to be a good long-term solution. Also a minor related issue: when doing so, the lexicon name gets an automatic numerical suffix, which has to be removed for version control.

It would be very useful if a future version of ELAN natively supports ‘referenced’ lexicon files, which can be used, edited and maintained by a team. This would make the interlinearization in ELAN more compatible with version-controlled collaborative workflows.

I’d sincerely appreciate it if you could consider this feature, and thank you for your sustained support.

Best wishes,
Weijian

Dear Weijian ,

In general, ELAN (so far) doesn’t allow multiple users to edit the same EAF file or the same lexicon file simultaneously in a safe way. On a user’s request we once introduced an option to create a file lock when opening an eaf file, so that only one user at a time can open and edit that eaf file and it’s not really a fool-proof solution.

Sharing a lexicon file between users and allowing them all to edit it and save the changes (and then updating the already loaded lexicons in ELAN instances of other users) is not trivial at all and sounds like a serious management challenge.

The location of lexicon xml files is (more or less) hard coded to /LexanLexicons.

The ‘elan.properties’ file contains the lines:

## Custom folder for storing and loading ELAN lexicon xml files. Specify the absolute path.
## On Windows use forward slashes or double backslashes, e.g. C:/Temp or C:\\Temp
#LexiconComponent.LexiconFolder=C:/Temp/Lexic

and this can probably/maybe be used to load (and save) lexicons from other locations, though this has not been extensively tested. But collaborating users are themselves responsible for not overwriting each other’s changes.