Teneo Developers

Class Manager

Introduction

The Class Manager allows to built an Intent Classifier directly in Teneo Studio by adding Classes and Training Data; read more about Intent Classification in Teneo here.

Create

To add a new class to the solution, follow the below steps:

  • In the Class Manager window, click Add Class in the top ribbon. The new class will appear in the Class list
  • In the Class details view (right side of the window) give the new class a name
  • Add training data by entering the text in the Enter Training Data field and then click Add or press Enter
  • Remember to click Save in the Class Manager to conserve the modifications.

The user is prevented from saving if a new class is created but no training data entered.

Some text editors, such as Notepad++, allows to select and drag text which can then be dropped onto the training data field in the Class Manager creating one training data example for each line in the original editor.

Edit

After opening the Class Manager, the top ribbon provides a range of buttons and options for working with classes; below please find a table presenting the various buttons.

To edit an existing class, simply double-click the class name in the Class list. This will open the Class details view in edit mode. Alternative, select the class and click Edit in the top ribbon. Remember to click Save in the Class Manager to preserve any modifications.

Class Manager: top ribbon (Home tab)

Class Manager's top ribbon

The Class Manager's top ribbon provide a range of buttons and options for working with classes, the below table lists the different buttons and, when relevant, links to more information are provided.

SectionButtonCommentMore info
Class ManagerCloseClose the Class ManagerClose
Save ClassesSave modifications performed in one or more classes; clicking the lower part of the button allows to save with or without commentSave
Import ClassesImport various classes from a .tsv fileImport classes
ClassesAdd ClassAdd a new classCreate
EditEdit the selected class
DeleteDelete the selected classDelete
Filter ClassesText field; use to filter on the list of ClassesFilter
Training DataFilter Training DataText field; use to filter on the list of training dataFilter
HistoryClassOpen the history of the selected classHistory
Stable VersionSet/UnsetSet the current version of the selected class(es) as stable or unset itVersion flag
BranchingInclude/ExcludeInclude or Exclude the selected class(es) from branching when working in a Localization setupLocalization setup

Class tab

The backstage of the Class Manager (Class tab in the top of the Class Manager window) contains the below mentioned menu items.

Menu itemCommentMore information
Save ClassesSave all classes
CloseClose the Class Manager window

Save

New and modified classes can be saved in two ways:

  • Individually by clicking the Save button in the Class details view, or
  • all at once, using the Save button in the top ribbon of the Class Manager.

Note that the following restrictions are bound to the save action of classes:

  • the class name cannot contain spaces or reserved characters
  • every class must contain at least one training data entry
  • classes cannot contain duplicated training data entries.

Close

To close the Class Manager, either:

  • Click the X in the top, right corner of the Class Manager window
  • Click the Close button available in the top ribbon
  • In the Class Manager backstage, click Close in the left-side menu

If unsaved changes are detected, Teneo Studio will prompt the user to Save Changes, Discard Changes or Cancel.

Delete

To delete a class, follow the below steps:

  • Select the class to delete in the Class list; multi-select by pressing Ctrl while clicking
  • In the top ribbon, click Delete

The selected class(es) are marked for deletion until the next Save action is performed in the Class Manager, or until the user clicks Apply in the Class details section.
If a class is marked for deletion by mistake, select the class again and click Cancel in the Class details section.
Remember to click Save in the Class Manager to perform the actual deletion of the selected class(es) and to train a new machine learning model without the deleted class(es).

Filter

In the top ribbon of the Class Manager, two text filters are available:

  • one to filter Classes, and
  • one to filter training data.

The two filters allows the user to filter entries separately in the Class list and the training data examples. Both filters operate directly over the lists and are kept while the user is working on the classes, so if a filter is applied on training data, the filter applied to training data examples of any selected classes in the list.

The options and functionalities described in this section currently only apply toTeneo Studio Desktop

The information related to a class, such as the name, Id and training data, is searchable in the Search tab of the main Teneo Studio window.

The Id of a class is available at the bottom of the training data in the Class details of the Class Manager when selecting the class. To copy the Id, simply right-click it and select copy from the context menu.

Class Id

For more information, please visit the Search section.

Import classes

The options and functionalities described in this section currently only apply toTeneo Studio Desktop

In Teneo Studio Desktop, the Class Manager allows to import several classes and training data from an external file (in .tsv format).

To import a .tsv file, follow the below steps:

  • In the Class Manager, click Import Classes
  • Browse to the location of the .tsv file, select it and click Open
  • Remember to click Save in the Class Manager to conserve the modifications.

File requirements

The requirements of the file to import are as follows:

  • plain text file, saved in the tab-separated values (.tsv) format
  • each line must contain a valid class name, separated from the training data example by tab
  • one line per training data example

Plain text file with tab separation

Details

Class name requirements

The requirements for the class names are:

  • the class name must be unique
  • the class name must be upper case
  • the class name cannot contain reserved characters nor spaces

Teneo Studio will automatically suggest a new class the name CLASS, this should be customized by the user. If the user adds more classes (without customizing the names), Teneo Studio will add an incremental number to the suggested names of the next classes, for example, CLASS, CLASS_1, CLASS_2, CLASS_3, etc. If the Class Name field is left empty, the user will not be able to save modifications until a name is provided.

Class name as annotation

At runtime, Teneo Predict uses the names of the classes to create the annotations for the most probable intent class(es) and denotes the annotation with a confidence score. The name of the annotation is the same as the name of a class in the Class Manager.

Therefore, the class name is visible in any place where annotations are usually seen, for example, in Tryout or scripting, and because of this users are encouraged to give each class a unique and easily recognizable class name.

As the class names are applied within the Teneo Platform as annotations, these can also be used within TLML syntaxes using the Teneo Linguistic Modeling Language.

Training data

For optimal performance, users are recommended to provide a minimum of ten unique training data examples per class and it is not possible to add two identical examples to a class. To avoid duplicate training data, the Class Manager prevents the user from saving changes if two or more training data entries are exactly the same.

To train a machine learning model, more than one class needs to be added to the solution and on top of this, the Class Manager, displays an error if a user tries to save an empty class (i.e., a class without training data).

To run Class Performance each class must contain a minimum of 5 training data examples