Language Object Reference

Language objects are building blocks for language conditions. They capture words, synonyms or various ways of expressing the same (partial) intent. They make it possible to efficiently write and re-use language conditions.

Elements of a language object name

All language objects in the pre-built language resources follow a naming convention. Apart from the descriptive purpose with the naming convention, it is used by the algorithm that creates language conditions from examples ('Train NLU').

When following the naming convention, a language object name has these elements:

  1. A mandatory kernel name (e.g. DOG)
  2. An optional suffix specifying part of speech (applicable only for the types LEX, MUL and SYN):

    • ADJ (adjective)
    • ADV (adverb)
    • FW (function word such as preposition and particle)
    • NN (noun)
    • VB (verb)

    On the SYN and MIX levels the tag may also be a combination of two parts of speech: ADJV for combined adjectives and adverbs, NNVB for combined nouns and verbs etc.

  3. A mandatory suffix specifying type (e.g. LEX. See the list below).

Types of language objects

Suffix Type Example Name Example Condition Generate NLU*
LEX Lexical entry: is the smallest building block from which more complex language objects are built. Covers different inflections of a word, but also spelling and regional variations. DOG.NN.LEX dog / dog's / dogs / dogs' yes
MIX Mixed entry: groups LEX language objects that share the same root. HAPPY.ADJV.MIX %HAPPY.ADJ.LEX / %HAPPILY.ADV.LEX yes
MUL Multi-word unit: forms the multi-word correspondence to the LEX language objects in that they capture the dictionary-level entries of multi-word units that are meant to be used as building blocks in higher level language objects. GIVE_UP.VB.MUL %GIVE.VB.LEX + %UP.FW.LEX yes
SYN Synonym set: groups LEX/MUL language objects with similar meaning. DOG.NN.SYN %DOG.NN.LEX / %HOUND.NN.LEX / %MUTT.NN.LEX / %POOCH.NN.LEX / (...) yes
ENTITY Entity: entity related concepts, such as colors or country names. Entities typically have columns with variables attached to them. Each entity in CURRENCY.ENTITY for example has a currency code. CURRENCY.ENTITY yes
LIST List: lists related concepts, such as colors or country names. A list often contains other lists. COLOR_SHADES.LIST %COLOR_SHADES_BLUE.LIST / %COLOR_SHADES_BROWN.LIST / %COLOR_SHADES_GRAY.LIST / (...) no
PHR Phrases: groups various ways of expressing the same phrase or partial intent. IS_BROKEN.PHR ((%BE.VB?PRESENT.LEX / %SEEM.VB.SYN)>> %BROKEN.ADJV.SYN ) / (...) yes
THEME Theme: groups words on a common theme. WEATHER.THEME (%RAIN.NNVB.SYN / %SNOW.NNVB.SYN / %SUNNY.ADJ.LEX / %RAINDROP.NN.LEX / (...)) no
PROJ Project: these language objects act as place-holders in the language resources. Should be customized to fit your project. COMPANY_NAME.NN.PROJ ((%YOUR.FW.LEX / %THE.FW.LEX ) >> %COMPANY.NN.SYN) / %ARTIFICIAL_SOLUTIONS.NN.SYN yes
REC Miscellaneous: contains condition that does not fit under any other category. HOW.REC %HOW.FW.LEX / %HOWS.FW.LEX / %HOWRE.FW.LEX / %HOWD.FW.LEX / (...) no
SCRIPT Script: language object: contains scripts, for example to count words or sentences. WD_LT4.SCRIPT {_.getSentenceWords().length<4} no
ANNOT Annotation: language object: contains annotation labels, and may be used instead of the labels themselves. POS_NOUN.ANNOT %$NN.POS no

*) If 'yes', the langauge object can be included in conditions that are generated from example inputs (when clicing the 'Now' button in the 'Condition' panel for a syntax trigger or transition).

Was this page helpful?