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.
- Common words: think of the common words that are business-specific and make sure to add those as Language Objects among the words to your library.
- Particle words: like 'Yes' and 'No' are among the most common words when creating interactive flows. Try to think of more relevant words to be added.
- Phrases: that are very common in your use case. For example, if you are creating a coffee shop where users can order a cup of coffee, the phrase 'Can I order' will be used a lot.
- Entities: for cases where you are in need of Entities, the recommendation is to create them and extract them using Data Actions.
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.
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.
|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 / dog's / dogs / dogs'
|Synonym set: groups LEX/MUL language objects with similar meaning.
|%DOG.LEX / %HOUND.LEX / %MUTT.LEX / %POOCH.LEX / (...)
|Phrases: groups various ways of expressing the same phrase or partial intent.
|((%BE.VB?PRESENT.LEX / %SEEM.SYN)>> %BROKEN.SYN ) / (...)
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.