Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of Entities in the Classifier #548

Open
msolefonte opened this issue Aug 17, 2020 · 0 comments
Open

Use of Entities in the Classifier #548

msolefonte opened this issue Aug 17, 2020 · 0 comments

Comments

@msolefonte
Copy link

After using natural for some hours I have discovered an amazing a powerful tool. However, coming from Dialogflow I have one question. In Dialogflow, you can create some Entities that are like a set of possible values for a consistent key.

Let's say, for example, that I have one Entity created, called animal. Animals if formed by this relations: mammal: [cat, dog, horse], insect: [spider, wasp, ant], fish: [shark, carp, guppy]. Then, I create a new rule for the classifier not based on the complete list of possibilities but on something like this:

myClassifier.addDocumentation("I always wanted to see an @animal",  "i_want_to_see_an_animal");
myClassifier.addDocumentation("I always wanted to see a @animal.fish",  "i_want_to_see_a_fish");

This prevents the user from writing all of the possibilities each time an animal is involved. It is even more useful if the result is something like ["i_want_to_see_an_animal", "dog"]. Creating custom responses for custom requests without having to create a function for each one.

Is there any way to use it? Have you consider introducing it? Thank you very much, your job is amazing.

Source of inspiration: https://cloud.google.com/dialogflow/docs/entities-overview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant