-
Notifications
You must be signed in to change notification settings - Fork 511
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
Feature top n intent #623 #715
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #715 +/- ##
===========================================
- Coverage 88% 87.95% -0.05%
===========================================
Files 65 65
Lines 3809 3843 +34
Branches 721 733 +12
===========================================
+ Hits 3352 3380 +28
- Misses 348 350 +2
- Partials 109 113 +4 |
Hi @deeiip , nlu_engine = SnipsNLUEngine().fit(dataset)
single_result = nlu_engine.parse("hello world")
top_results = nlu_engine.parse("hello world", top_intents=3)
assert(isinstance(single_result, dict))
assert(isinstance(top_results, list)) Another way to do it would be to add a new API: nlu_engine = SnipsNLUEngine().fit(dataset)
top_results = nlu_engine.parse_top_intents("hello world", 3) This solution is a bit less pythonic though. I will keep you updated on how we decide to move forward. |
Hey @deeiip, |
@adrienball thanks for adding the feature. This feature should help a lot in our product. And obviously we don't need to take the headache of maintaining our own modified copy of snips. |
Hey @deeiip , |
Description:
Checklist: