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 context values in the classifier #547

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

Use of context values in the classifier #547

msolefonte opened this issue Aug 17, 2020 · 0 comments

Comments

@msolefonte
Copy link

msolefonte commented Aug 17, 2020

I am new to this tool so I do not know if this has been asked before (have not found it in the issues), but I would like to know if there is any way to use context values in the Classifier. This means that the results can vary according to some values.

Let's say I have these relations: "My favorite animal is the dog" -> context = [animals] and "My favorite song is the Yellow Submarine" -> context = [songs].

Then I ask "Which one is yours?", which would result in different values depending of the value of context. This one looks like a poor example because "Which one is yours?" can be checked always and context can be read inside of the function, but sometimes it is not possible.

Basically, what I am asking is to know if it possible to train the classifier to embrace/reject some context values. This could be an example:

myClassifier.addDocument('which one is yours?', contextRequired = ['colors'], your_favorite_color);
myClassifier.addDocument('which one is yours?', contextRequired = ['animals'], your_favorite_animal);

This should also be used in negative ways:

myClassifier.addDocument('good morning', contextRejected = ['already_greeted'], good_morning);
myClassifier.addDocument('good morning', contextRequired= ['already_greeted'], you_are_so_repetitive);

Not my best examples but I hope you can understand me. It is completely based on the Contexts of Dialogflow:
https://cloud.google.com/dialogflow/docs/contexts-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