3.5.2. Lexicons

The main purpose of the Lexicon Component in ELAN is to support the (semi-automated) interlinearization process. It is not intended as a full-fledged lexicon tool, though the data model supports a bit more than strictly necessary for its main purpose. The data model and XML-based data format are similar to the LIFT format (Lexicon Interchange Format)), but simplified. These are the main fields of a lexical entry:

The main field is lexical-unit (equivalent to lemma, headword, the primary lexical form). morph-type indicates the word part (e.g. stem, prefix, suffix), analyzers can use this information when processing the input text. The grammatical-category field is the category of the lexical item, the part of speech. The Edit Entry window shows which other fields can be added at the moment. (The data model defines more fields than visible in the entry window, but support and documentation hereof is still pending.) The user can add custom fields at the level of the entry and at the level of sense, these will be visible as field: name.

In the lexicon panel of the interlinearization mode the contents of lexicons can be displayed, one lexicon at the time. But it is possible to store and manage multiple lexicons on disc and choose which one to display. The leftmost drop-down box above the table lists all lexicons that have created or imported.

The list of available lexicons

Figure 3.24. The list of available lexicons


If a lexicon has been selected and is displayed in the panel, lexical entries can be added, edited or removed.

Lexicon overview

Figure 3.25. Lexicon overview


The lexicon overview can be adjusted to display or hide certain columns. To do so, you have to right-click on a lexical entry to display the context-menu. From there, you can show or hide columns of the lexicon. Some fields can occur more than once in an entry (like variant or gloss), these will be displayed in a single cell, each value surrounded by square brackets.The context menu also has Add, Remove and Edit items, which have the same function as the buttons below the table (see Section 3.5.2.2).

Lexicon context-menu

Figure 3.26. Lexicon context-menu


The order of the entries in the table can be changed by clicking on any of the column headers, a little arrow indicates whether the items are sorted in ascending or descending order.

3.5.2.1. Creating & editing lexicons

Actions for creating and editing lexicons are available in the Lexicon Actions drop-down menu. The actions always apply to the lexicon that is selected in the lexicons list and visible in the table. The actions will be discussed below.

The Lexicon Actions

Figure 3.27. The Lexicon Actions


  • To create a new lexicon from scratch choose Create New Lexicon.... A new dialog will appear, allowing you to fill out details about your new lexicon.

    Create New Lexicon dialog

    Figure 3.28. Create New Lexicon dialog


    When the details have been filled out (a Name and a Language are required), click Apply to create the lexicon. The lexicon file will be stored in a predefined folder labeled LexanLexicons inside the Section 1.1.2. The filename is based on the name of the lexicon and the file extension is .xml.

  • The Open Lexicon... option allows to open a lexicon that is already in the native format but is in a different folder. The lexicon file is then copied to the LexanLexicons folder. So, this action behaves like an import function for lexicons that don't need to be converted (e.g. a file that has been shared by a colleague).

  • The Close Lexicon option closes the current lexicon, the table will be cleared and No Lexicon will be selected.

  • The Save Lexicon action updates the corresponding file in the default location, if there have been any changes in the lexicon.

  • The Save Lexicon as... option allows to save the lexicon somewhere else in the same file format, e.g. for the purpose of creating a back up file. This action is similar to the export functions but then in the native format.

  • The Save Lexicon with Current Entry Order option saves the lexicon with the entries sorted as they are visible in the table of lexical entries (the lexicon framework doesn't allow to specify a custom sort order yet).

  • The Edit Lexicon Properties... option opens a window similar to the Create New Lexicon dialog, the properties that have been entered before can be updated or completed here. But there is an additional Custom Fields tab that allows to specify the names of custom fields (at the level of entry or sense or both) to be used in this lexicon. The Click the Apply button to apply the changes to the lexicon.

    The Edit Lexicon Properties window

    Figure 3.29. The Edit Lexicon Properties window


    The Custom Fields tab

    Figure 3.30. The Custom Fields tab


  • The Import Lexicon... option opens a file browser window that allows to select either a lexicon in LIFT format (.lift) or a CorpAfroAs lexicon (.eafl). A converter will import as much as possible from the original lexicon data into an ELAN lexicon and will add the new lexicon to the list of lexicons.

  • The Export Lexicon... action only supports conversion to LIFT format.

[Note]Note

There is currently no Undo/Redo mechanism for lexicon edit actions!

[Note]Note

If multiple transcription windows are open, using the same lexicon, modifying the lexicon should preferably be done in only one window. On Windows there is no guarantee that all windows are updated correctly after a change in a lexicon made in a different window!

[Note]Note

More documentation about the structure of lexical entries, about which fields are required, what is hardcoded etc. will follow. The same for native, import and export formats etc.

3.5.2.2. Editing lexical entries

After creating or importing a lexicon, lexical entries be added, edited or removed. Adding a new entry can be started by clicking the Add button on the bottom of the Lexicon main panel or by choosing the Add menu item from the context menu, if there are already entries in the table. A new dialog will appear, allowing to create a new entry by entering values for, at least, the required fields.

Add a Lexical Entry

Figure 3.31. Add a Lexical Entry


When you are finished, click Apply to add the entry to the lexicon. Required fields will be highlighted if you click Apply while not all requird fields are filled in.

Editing a lexical entry can be done by either clicking the Edit button on the bottom of the panel, by right-clicking the entry and choosing Edit from the context-menu or by double-clicking the entry in a cell that can not be edited directly in the table (i.e. the lexical-unit field or any field of which there can be more than one). A dialog will open, displaying the chosen lexical unit as a tree structure. Some general information is shown, such as ID and date of creation.

Edit a lexical entry

Figure 3.32. Edit a lexical entry


  • To edit the entry, click on the value that you would like to add or change or press TAB to select the first editable field. It will become active and ready for editing, a dark blue border will highlight it. Hitting the TAB key accepts the value of the current field and activates the next field.

  • The fields that are displayed in a dark grey color are so-called placeholders: these fields are not yet there, but can be created. When activating such field the + button can be clicked to add the field to the entry and to make the text field editable.

  • In general when activating a field + or - buttons can be present and can be enabled or greyed out, depending on whether more fields of that type can be added or if that field can be deleted. Pressing the + or = keyboard key triggers the Add Field action, the - key the Remove Field action.

  • When a field is removed it will still be shown in the entry, but in a red color.

  • Changes will only be applied to the entry in the lexicon after clicking the Apply button or pressing the ENTER key.

  • Changes can be discarded by clicking the Cancel button or pressing the ESC key or the CTRL+W combination.

Removal of a lexical entry is done by highlighting the entry in the lexical entries table and then either clicking the Remove button on the bottom of the Lexicon panel, or by right-clicking the entry and choosing Remove from the context-menu.