Improve deterministic intent parser #126
Merged
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.
This reflects changes that were made here: snipsco/snips-nlu#767
Description:
This PR improves the inference part of the deterministic parser, by generating better variations of the input. More specifically, each intent is associated to an entity scope (corresponding to all the entities present in the intent), and for each of these scopes a variation of the input is created by replacing the potential entities found by their placeholders.
This makes the deterministic parser more likely to match inputs.