Teneo Developers

Share to

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. The naming convention not only ensures resources are described in a useful manner, but is also 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)
    • CW (content word)
    • 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

SuffixTypeExample NameExample ConditionGenerate NLU*
LEXLexical 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.LEXdog / dog's / dogs / dogs'yes
MIXMixed entry: groups LEX language objects that share the same root.HAPPY.ADJV.MIX%HAPPY.ADJ.LEX / %HAPPILY.ADV.LEXyes
MULMulti-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.LEXyes
SYNSynonym 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
ENTITYEntity: 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.ENTITYSee here for an example Entityyes
LISTList: 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
PHRPhrases: 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
THEMETheme: groups words with a common theme.WEATHER.THEME(%RAIN.NNVB.SYN / %SNOW.NNVB.SYN / %SUNNY.ADJ.LEX / %RAINDROP.NN.LEX / (...))no
PROJProject: 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.SYNyes
RECMiscellaneous: 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
SCRIPTScript: language object: contains scripts, e.g. to count words or sentences.WD_LT4.SCRIPT{_.getSentenceWords().length<4}no
ANNOTAnnotation: language object: contains annotation labels, and may be used instead of the labels themselves. This is deprecated, please use .ENTITY instead.POS_NOUN.ANNOT%$NN.POSno

If 'yes', the language object can be included in conditions that are generated from test data (when clicking the 'Draft Condition' button under the 'Condition' panel in 'Advanced Options' for a Conditional Match Requirement).