Adding entities to text predictions
Configure your text prediction to detect entities in the text, such as names of people, organizations, addresses, emails, phone numbers, and postal codes. You can use entities to populate case properties automatically from incoming messages in your conversational channels.
- Open the text prediction:
- In the navigation pane of App Studio, click Channels.
- In the Current channel interfaces section, click the icon that represents a channel for which you want to configure the text prediction.
- On the channel configuration page, click the Behavior tab, and then click Open text prediction.
- For the prediction that you want to configure, click Open prediction.
- In the Prediction workspace, click .
- In the Language field, select the language for which you
want to add an entity.
Result: The change of language refreshes the list of available entities. The list now displays the entities for the selected language. - Click Create entity, and then perform one of the
following actions:
Choices Actions Create an entity - Select Create new entity, and then click Next.
- In the New entity window, in the Entity name field, enter the name for the new entity.
- In the Entity model field, select an
entity extraction model with which you want to associate the
new entity.You can also create an entity extraction model by selecting Create new, and then providing a name for the model.
- Click Create.
Choose an entity from the list - Select Choose existing entity, and then click Next.
- From the list of available entities, select one or more
entities, and then click Add.
Result: The selected entity type is added to the list. - To configure the entity, click the Properties icon next to the entity.
- Configure the entity by using one of the following methods:
Choices Actions Machine learning - On the Machine learning tab, click Add training data.
- In the Text window, enter a text
sample to use as training data for the entity extraction
model, and then click Add.
Result: The text sample is added to the list of pending training data. - Add multiple training data by repeating steps 6.a and 6.b.
- Click each training data in the list, and then review the results of text analysis.
- If the model does not detect the entity in the text or assigns an incorrect entity type to the entity, double-click and then right-click the entity in the text, and then select the correct entity type from the list.
- Add training data to train the entity extraction model that
is associated with this entity type.
Tip: Machine learning models for detecting entities work best when entities do not follow any specific pattern but appear in a specific context or are surrounded by certain words or phrases. For example, in the sentence I work at uPlusTelco, a machine learning model might classify uPlusTelco as an organization with greater confidence because of the verb work and the preposition at, which often appear together with organization names. Identifying flight number entities in text samples
RUTA - Click RUTA, and then select the Enable RUTA check box.
- Use the Ruta language to define the detection
pattern.
Tip: Use this method to detect entity types whose structure matches a certain pattern. For example, you can use a Ruta script to detect strings that contain the @ symbol and the .com sub-string as email_address. In addition, you can use this detection method to detect entity types through the token length (for example, postal_code or telephone_number), or to extract entities from a word or token. You can select and modify any of the templates that are provided.
You can also combine entity types through a Ruta script. For example, you can combine an entity type for currency ($) and number (10) to get the entity money whenever the two entities appear together. When you reference another entity type in a Ruta script, always use lowercase, irrespective of the original configuration. For example,
EntityType{FEATURE("entityType", "amount")}
The following figure shows a Ruta script that detects letters or words followed by numbers, which you can use to recognize flight numbers, such as AE3123.
Adding a Ruta script for detecting flight numbers
Keywords - Click Keywords, and then select the Enable keywords check box.
- To add a keyword manually, click Add keyword, and then enter the keyword and its synonyms.
- To create a list of keywords by uploading a file, click
Choose File, browse for the file,
and then click Open.If you do not have a topic file ready, you can create it by using the keyword template.
Tip: Use this detection method when the entity type that you want to extract is an umbrella term for a finite number of associated terms or phrases that do not follow any specific pattern. For example, you can define and associate the city entity type with the keyword New York, with such synonyms as NY, NYC, Big Apple, The Five Boroughs. Adding keywords for an airport entity type - Click Save.
- In the prediction workspace, click Save to save your changes.
The following video shows a sample entity configuration using machine learning:
The following video shows a sample entity configuration using keywords:
Previous topic Importing topics to text predictions Next topic Reviewing and adding training data for text predictions