wit-ai / wit

Natural Language Interface for apps and devices
https://wit.ai/
931 stars 91 forks source link

Question - Associate Entities to Value #2711

Closed Dolotboy closed 5 months ago

Dolotboy commented 6 months ago

question about wit?*

What is the current Behavior? I created an Intent name "open_site" and i created a Free-text Entity name "Sites". For the moment I can train the model to know what is a WebSite in Utterance. But there is no link associated to the web site.

What is the expected behavior? I would like to be able to associate links to the Web site I give him. If for example in my bot app I send the sentence Open youtube. I would like it to be able to know what is the URL of youtube. Is there a way i can associate values to entities values. So youtube would be https://youtube.com, Twitch would be https://twitch.tv. Because for the open the only thing I can do is get that the intent is open_site and that the site I want to open is youtube, but can't do anymore. So is there a feature for this on WIT or I'll need to manage this on my side on my bot app.

jayyteee commented 5 months ago

Hi @Dolotboy, there is a way to do something similar to what you want using Entities. You can create an entity (i.e. website) that has lookup strategy of Keywords or Free Text & Keywords. Then you can have the keyword be the url, such as 'https://youtube.com', and then included synonyms that you expect to receive, like 'youtube' for this example.

Dolotboy commented 5 months ago

@jayyteee This is a good idea I didnt see it that way (The opposite of how I saw it). Thanks I will try it !