Here are some common errors in entry structures and how to avoid them.

Incorrectly designed structures will still allow editors to create entries and input data. However, it might produce inconsistent entries. Moreover, it might be impossible or very difficult to work with the data later. For example, it may be impossible to format the dictionary for the final publishing or to convert the dictionary for use in different scenarios.

Syntax

Each element consists of a name (entry), a colon (:), a space ( ) and a value. The structure definition only requires the name and the colon. Values refer to the actual dictionary content. They will be added when writing each entry. The indent is two, four, six etc. spaces. It is highly recommended to learn the basics of the NVH format and edit the structure in the visual editor.

Avoid errors

The best advice is to start with standardized elements. Then hide those that are not needed and only manually add the specific ones not included among the standardized elements. It is recommended not to build the structure from scratch completely manually.

Wrong

Correct

entry:
definition:
entry:
  definition:

It only makes sense to have a definition if there is the headword (entry). Definition must depend on the headword. The dependence is marked by indenting the definition element with two spaces.

entry:
  partOfSpeech:
  pronunciation:
  sense:
  definition:
  example:
entry:
  partOfSpeech:
  pronunciation:
  sense:
    definition:
      example:

Although this structure is possible, it is not ideal. It allows the editor to insert an example sentence even if there is no definition. Also several definitions can be inserted without indicating to which sense the definitions and examples belong. Normally, it is required that the definition belongs to a sense and that an example can only be added as long as there is a definition.

entry:
  partOfSpeech:
  pronunciation:
  sense:
    definition:
      example:
  sense:
    definition:
      example:
entry:
  partOfSpeech:
  pronunciation:
  sense:
    definition:
      example:

An element must not appear more than once.  Even if the structure contains only one sense, entries can contain more than one sense. When editing a concrete entry, multiple senses can be inserted. Their number is controlled by setting conditions for the sense element.

The structure below is also correct, even though it contains two example elements. Each example belongs to a different parent. This is indicated by the indentation (spaces). Although there is no mistake to fix, you may prefer to name the elements fr-example and pt-example to make it clearer to the human eye.

entry:
  fr-translation:
    example:
  pt-translation:
    example: