-
Notifications
You must be signed in to change notification settings - Fork 516
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
Lookup Intent Parser #759
Merged
Merged
Lookup Intent Parser #759
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
What -- This introduces a new dictionary-based deterministic intent parser. The parser uses a hashmap to map normalized utterances to their expected intent and slots. Symbol tables are used to store the intents names and slot names and this reduces the amount of information stored in the dictionary values. Why -- This implementation is compact enough to store a huge number of utterances and their expected outputs. It also out performs the regex implementation as dict lookups are faster. **NOTE**: The space usage can even be reduced further by hashing the dictionary keys. (_this is a future plan once this impl is stabilized_)
mattgathu
force-pushed
the
feature/lookup_intent_parser
branch
from
February 22, 2019 10:49
0449fb7
to
0afc9ed
Compare
mattgathu
added a commit
to snipsco/snips-nlu-rs
that referenced
this pull request
Feb 26, 2019
A new hashmap based intent parser. The normalized/canonical form of an utterance serves as the key and the value is tuple of `(intent_id, [vec_of_slots_ids])` Once a lookup is done at inference, the intent and slots are retrieved by matching their ids to a vec of intent names and a vec of slot names respectively. This is the rust implementation of snipsco/snips-nlu#759
adrienball
requested changes
Feb 28, 2019
* simplify implementation for consistency and simplicity: - avoid calculating range mappings - refactor text preprocessing and avoid code duplication * fix bug - fix key collision handling * fix up the docs
mattgathu
added a commit
to snipsco/snips-nlu-rs
that referenced
this pull request
Mar 1, 2019
A new hashmap based intent parser. The normalized/canonical form of an utterance serves as the key and the value is tuple of `(intent_id, [vec_of_slots_ids])` Once a lookup is done at inference, the intent and slots are retrieved by matching their ids to a vec of intent names and a vec of slot names respectively. This is the rust implementation of snipsco/snips-nlu#759
adrienball
requested changes
Mar 1, 2019
adrienball
approved these changes
Mar 1, 2019
3 tasks
Use hashes as dictionary keys instead of actual strings. This reduces the size of the model. Add utility function to handle key deserialization from JSON.
…_hashing Add key hashing to Lookup Intent Parser for perf
adrienball
force-pushed
the
feature/lookup_intent_parser
branch
from
May 16, 2019 14:43
6a97318
to
a3c3039
Compare
adrienball
pushed a commit
to snipsco/snips-nlu-rs
that referenced
this pull request
Jul 11, 2019
* feature: lookup intent parser A new hashmap based intent parser. The normalized/canonical form of an utterance serves as the key and the value is tuple of `(intent_id, [vec_of_slots_ids])` Once a lookup is done at inference, the intent and slots are retrieved by matching their ids to a vec of intent names and a vec of slot names respectively. This is the rust implementation of snipsco/snips-nlu#759
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
This introduces a new dictionary-based deterministic intent parser.
The parser uses a hashmap to map normalized utterances to their
expected intent and slots.
Symbol tables are used to store the intents names and slot names
and this reduces the amount of information stored in the dictionary
values.
Why
utterances and their expected outputs.
Checklist: