Voice Gateway – Handling Homophones 

Implementing virtual voice agents comes with its own unique set of challenges, one of them is the question of how to handle homophones - words that sound the same or at least very similar. 

Intent Solution 

Homophones can be handled by simply adding additional example sentences to existing Intents. This can look a bit weird, but will get the job done, as you can see below the added Example Sentences fit nicely into the Intent model: 

Baseline Example Sentences: 

image1.png

 

Additional Homophone Example Sentences: 

image2.png

 

Lexicon Solution 

If you use Lexicons, you can simply add the Homophones as synonyms to the existing Lexicon: 

image3.png

You can also use a Code Node script to modify the input text, in case you need some cleansing before a fuzzy search or something similar. The code below will replace all detected synonyms of the homophone Slot with their respective keyphrase: 

let tempText = input.text 

for (let slot of input.slots.homophone) { 
    //replace homophones with target phrase 
    tempText = tempText.replace(new RegExp(slot.synonym),slot.keyphrase) 
} 

input.text = tempText

Below you can find a screenshot of the results: 

image4.png

 

Combined Intent & Lexicon Solution 

You can use both solutions together, if you attach the Lexicon to the Flow with your Intents. For that it is recommended that you add additional slots to the existing Lexicon, which will allow you to finetune the Intent Annotation. 

Additional Lexicon Slots: 

image5.png

Annotated Intent Example Sentences: 

image6.png

Using the combined solution should provide very high Intent scores: 

image7.png


Comments

0 comments

Please sign in to leave a comment.

Was this article helpful?
0 out of 0 found this helpful