Teneo comes with a large number of supported languages. All languages that are supported by Teneo can be processed by the Teneo Engine, meaning user input can be split into tokens and sentences. When additional resources are required, we can create our own project-specific Library. Libraries are powerful tools, as they not only allow us to create and use the resources we need in an efficient manner, but also allow us to re-use language objects across multiple bots.
In this article, we will discuss best practices when creating Libraries, and provide an example of how this can be implemented.
Libraries can become a relevant option when you are building multiple solutions for different use cases. As Teneo lets you use multiple Libraries, you can also create one for your domain- or company-specific lingo.
Creating a library can be challenging. That is why we have compiled the following list of recommendations to keep in mind when creating your own Language Objects and Entities.
A guide on how to create your own Language Objects can be found here. Creating them one by one takes a longer time in the beginning, but as you keep developing your bot you will be able to re-use these language objects, making this the far more sustainable option.
We have the following recommendations for best practices when it comes to creating your own Libraries.
The proper way to do this is to create a dedicated folder in which to store your Language Objects. The reason for this that it is best to have a clear structure in your solution so that you can easily find and maintain Language Objects and Entities in your own Library.
As the picture suggests, it is also recommended to create a new folder for storing Entities. The user has the option of creating one folder to store each type of Language Object.
Now that you are ready to create Language Objects, establish some guidelines on how they should be created. We would recommend you to follow our naming conventions in order to make sure that the whole team can easily find them, identify what they are used for, and confirm that their content is correct and covers all required forms.
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.LEX | dog / dog's / dogs / dogs' | yes |
SYN | Synonym set: groups LEX/MUL language objects with similar meaning. | DOG.SYN | %DOG.LEX / %HOUND.LEX / %MUTT.LEX / %POOCH.LEX / (...) | yes |
PHR | Phrases: groups various ways of expressing the same phrase or partial intent. | IS_BROKEN.PHR | ((%BE.VB?PRESENT.LEX / %SEEM.SYN)>> %BROKEN.SYN ) / (...) | yes |
Although we support a lot of different names we recommend your own library to adhere to these naming conventions in order to keep everything as clear and simple as possible.
Another reason to make sure to follow our naming conventions is that Teneo's NLU Generator bases its suggestions on Language Objects that follow these conventions. Make sure to avoid misspellings when creating your lexical resources; these should be handled at the input processor level.
Was this page helpful?