Your dictionary may need setting up two types of unique identifiers

  • headword url identifier (compulsory for all dictionaries),
  • element identifiers for relations (only required for dictionaries which make use of relations).

Headword URL identifier

Each headword has its own unique url. When the dictionary is published, this URL can be shared online and it will lead directly to the entry. For example:

https://www.lexonomy.eu/dictionary/ietga6ts/entry/lens~N

This url is composed of the website, your dictionary ID and the headword and POS. The last part (in bold) is a custom setting. It can contain one or more entry elements provided they are unique across the whole dictionary.

To set the headword URL identifier, go to CONFIGURE – HEADWORD LIST. When setting the identifier, Lexonomy checks your dictionary data and will not allow you to save a combination that is not unique. If it is not unique, you should add another component to make it unique.

Automatic checks

When setting up the unique identifiers, Lexonomy check the existing dictionary data and will not allow identifiers that are not unique.

After identifiers are in place, Lexonomy will not allow saving an entry unless the elements used in the identifiers are unique.

Element identifiers for relations

The headword URL identifier is automatically used as the entry identifier in relations.  If you only plan to link whole entries, the setup is complete. If you, however, plan to link other elements, for example to link the idiom hit the nail on the head to the right sense of the entry nail, you need to set up a unique identifier for the sense element.

To set identifers for elements, go to CONFIGURE – RELATION TYPES – ELEMENT IDENTIFIERS

Only after the identifer is set, the element can be used as a target in a relation type.

Automatic checks

The unique identifiers are also checked when edited entries are saved. If an entry element which is used as target in a relation, contains a value that makes it not unique, saving the entry will not be possible.

Read details at the very end of the page.

What is and is not unique?

Identifiers must be set up so that they are unique. Here we explain how to set up identifiers so that they are unique.

Example 1 – headword url with unique entries

entry: inflation
  pos: noun
  sense: 
    definition: A general increase…
    example: Rising inflation …
entry: liquidity
  pos: noun
  sense: 
    definition: The ease with wh…
    example: Banks maintain hi…
entry: fiscal stimulus
  pos: noun
  sense: 
    definition: Government spending…
    example: The fiscal stimulus…

Note: The empty sense element is only used to make the dictionary DMLex compliant. It can be removed if DMLex compliance is not required.

In this simple glossary of economic terms, each headword is different and therefore unique.

Headword url

Headword url can be set with the entry element only. No need to add other elements.

The URLs of the entries will then look similar to this. The above setting affects the end of the URL.
https://www.lexonomy.eu/dictionary/be6kmvcg/entry/home

Element identifiers in relations

It is typical for terminology to have only one sense and so relations are likel to be need only to link whole entries. Relations between concrete senses will probably not be required. Therefore, there is nothing else to set. The headword url identifier will be used to identify the entries in relations.

Example 2 – headword url with duplicated entries

entry: work
  pos: noun
  sense:
    definition: Activity involving effort…
    example: Her work contributed greatly…
entry: work
  pos: verb
  sense:
    definition: To perform tasks or duties…
    example: She works diligently every…
entry: home
  pos: noun
  sense:
    definition: A place where one lives…
    example: They returned home after…

Headword url

In this dictionary, it is not enough to use the entry element only as the headword url identifier. There are two entries with entry: work . Therefore, entries are not unique in this dictionary. An additional element should be added to make the URLs unique. The entry +  pos combination is unique: work~noun and  work~verb

The URLs of the entries will then look similar to this. The end of the URL is what is set by the above procedure.
https://www.lexonomy.eu/dictionary/be6kmvcg/entry/home~noun

With the above setting, if the editor tries to create a new entry for home (noun), Lexonomy will not allow saving this entry because it would generate a duplicated URL identifier.

Example 3 – identifier for unique senses

entry: party
  pos: noun
  sense: celebration
    definition: A social gathering for enj…
    example: The party was lively and enj…
  sense: politics
    definition: A political group seeking i…
    example: The party gained influence in…
entry: work
  pos: verb
  sense: economic activity
    definition: Activity done to earn incom…
    example: She works daily to support he…
  sense: function properly
    definition: To operate as intended with…
    example: The device works smoothly af…

This example explains how to set a unique identifer for the sense element. Setting identifiers for other elements is analogical. Identifiers only need to be set up for elements which serve as targets in relations. No need to set identifiers for all elements. In most dictionaries, having a headword URL identifier and the identifier for sense  will suffice.

In this example, each sense has a name (e.g. sense: celebration) and the sense names are unique within each entry. The identifier setting is simple. No identifier is necessary for entry because the headword url identifier will be used.

With the above setting, if the editor tries to create a new sense for party (noun) and names the sense: politics, Lexonomy will not allow saving the entry because it would generate a duplicated URL identifier.

Example 4 – identifier for duplicated senses

entry: party
  pos: noun
  sense: 
    definition: A social gathering for enj…
    example: The party was lively and enj…
  sense: 
    definition: A political group seeking i…
    example: The party gained influence in…
entry: work
  pos: verb
  sense: 
    definition: Activity done to earn incom…
    example: She works daily to support he…
  sense: 
    definition: To operate as intended with…
    example: The device works smoothly af…

In this dictionary, entries have senses but the senses are not named. Their value is empty. This makes the sense element not unique. To resolve this, an additional element should be added to the identifier. It should be one of the child elements. It does not have to be the direct child.

Adding the definition  will make the sense identifier unique because each sense has a different definition.

Automatic checks – broken relations after editing

All unique identifiers are composed of element values. This means that if the entry is edited and the element used as a target in a relation changes, the unique identifier also changes.

Example

If the headword url identifier is composed of the entry entry and pos and the entry for work (noun) is edited to work (verb), the unique identifier changes from work~noun to work~verb. The relations contining this entry will no longer be valid.

Similarly, if a sense identifier is set up to contian the definition and the definition is updated, the identifier of the sense changes. If the sense is a member of a relation, the relation becomes invalid.

Upon saving an entry, Lexonomy checks automatically for these changes and ensures data integrity. It will display an allert asking the user to take a decision about what should be done with the broken relation(s).