I'm testing Watson Conversation API with a possible dialog my company wants to create. We are developing with Brazilian Portuguese. Given the portugues is a rich language and sometimes the users can make mistakes, we want to predict these possible errors, mainly with special chars and accents.
For sample, the word produção
can be written by users like: produção
, producao
, produçao
, producão
. Is possible to have a regular expression on the intents and entities to have something like the picture bellow? Sometimes we have another word to make a sense liek produção final
, produção geral
, produção passada
, etc.
Another quick question, is possible to create examples on intents merging with entities values, using something like @(producao)
(like image)?
Thank you
You cannot use regular expressions in intents or entities however I think you should still be able to cope with variations.
There is currently no built in handling of typos or accent normalization when matching intents however if there are enough features in a sentence to match on, the occasional typo shouldn't cause problems. For very short examples, there may be some value in adding additional examples for common mistakes.
For entities, you can include synonyms and I have used that to include common mistakes before.
You shouldn't try to include a reference to an entity directly in your intents. For example, rather than Qual a @(producao)
you should just have Qual a produção
, along with other examples of the same intent, perhaps with different entities, or different synonyms for the same entity. For example, I might have the following examples for a #directions intent...
Along with values like car, bus, train, bicycle, etc. for a @transport entity. (Sorry I can't give a Brazilian Portuguese example!) There's no need to explicitly name the entity/entities you're expecting to find in an intent.
And finally, you can use regular expressions in conditions on dialog nodes, for example...
input.text.matches( 'produ[cç][aã]o' )