Teneo Developers

Format language objects

Language Object file specifications

Before creating the file to import Language Objects, please make sure to read thegeneral specifications first.

When creating the file to import Language Objects, each line in the file represents a new Language Object.

The #language_object tag indicates the start of a new Language Object and is mandatory, and a Language Object must always have a name and a condition.

The below example imports a Language Object in its simplest form (note that the commas separate the fields):

#language_object,HAPPY.ADJ.LEX, , ,happy/happier/happiest

Alias and description fields are mandatory, but the values can be left empty as in the above example.

When adding positive and negative examples to a Language Object, they need to be specified in specific fields (field 5 and 6 in the table below, or column 6 and 7 in, for example, an Excel workbook), but for Language Objects without positive or negative examples, no fields are needed.

The #folder tag is optional, but when used it is mandatory to add a field specifying the relative folder path. If the folder doesn't exist in the solution, it is created during Bulk Import. When importing a file into the solution root, the folder tag is mandatory.

The optional #variables and #nlu_variables tags are used for adding variables and NLU variables to Language Objects. Multiple variables can be added by simply adding additional name and value pairs.

Tags and fields

The tag (column 1) can be followed by the fields shown in the below table:

TagField 1Field 2Field 3Field 4Field 5Field 6
#language_object<name><alias><description><condition><positive examples><negative examples>

Mandatory fields with mandatory values

These fields need to exist in the file and they need to contain values.

  • #language_object Mandatory tag, indicates the beginning of a new Language Object
  • <name> Mandatory field, contains the name of the Language Object
    • Must be written in capital letters
    • Must be unique (both within the file and within the solution it is imported to)
    • Cannot contain spaces, reserved characters etc.
  • <condition> Mandatory field, contains the condition of the Language Object written in Teneo Linguistic Modelling Language

Mandatory fields with optional values

These fields need to exist in the file, but can be left empty/have no value.

  • <alias> Mandatory field (field 2/column 3), value optional

    • Must be written in capital letters
    • Must be unique (both within the file and within the solution it is imported to)
  • <description> Mandatory field (field 3/column 4), value optional

Optional fields with optional values but fixed placement

These fields are optional and so are their values. When adding positive and/or negative examples, these always needs to be specified in the field 5 and 6 respectively (see above table), but for Language Objects without any examples, no fields are needed.

  • <positive examples> Optional field with optional value

    • Positive examples of a Language Object
    • Separate examples with / (slash)
  • <negative examples> Optional field with optional value

    • Negative examples of a Language Object
    • Separate examples with / (slash)

Optional fields with mandatory values

The fields detailed below are optional, but if they exist they need to have values. When added, they need to be written in the same line as the #language_object tag they belong to.

Optional tags
#folder<folder name>
#nlu_variables<nlu variables name><nlu variables value>
#variables<variables name><variables value>
  • #nlu_variable <nlu variable name> <nlu variable value> Optional tag, when added the values are mandatory

    • The tag indicates that, at least, the following two fields contain a name and a value of an NLU variable
    • It is possible to add multiple name/value pairs in the following fields
  • #variable <variable name> <variable value> Optional tag, when added the values are mandatory

    • The tag indicates that, at least, the following two fields contain a name and a value of a Language Object variable
    • It is possible to add multiple name/value pairs in the following fields.

Optional tag with optional value

  • #folder <folder name> Optional tag, optional value
    • Folder tag and relative folder path are mandatory if importing to solution root
    • The folder name is relative to the selected folder in Teneo Studio upon Bulk Import
    • To specify a subfolder, each folder should be separated with / (slash)