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

Expand primitives based on heuristics #89

Merged
merged 14 commits into from
Oct 3, 2019
Merged

Expand primitives based on heuristics #89

merged 14 commits into from
Oct 3, 2019

Conversation

sileix
Copy link
Member

@sileix sileix commented Sep 9, 2019

To further reduce the amount of work needed from developers, a heuristic expander is added to generate more primitives based on the provided dataset.

The basic idea is that for each primitive example e:
(1) if e is a filter, and its utterance contains the canonical of the function, use it as an expander
(2) for other primitive examples using the same function, use their utterances to replace the canonical in e's utterance, and at the same time apply the filter in e.

We currently only apply this to filters, we can probably also apply it to other grammar too.

This will allow us to expand templates at the device level easily
Only use primitives with filter in it and canonical in utterance to expand
- do not expand if the canonical appears multiple times
- correctly handle canonical matching, i.e., handle cases where canonical contains multiple tokens
- in case that only "everything" dataset is available, load the dataset without expansion
@sileix sileix requested a review from gcampax September 26, 2019 05:16
Copy link
Contributor

@gcampax gcampax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you adding a new file_thingpedia_client.js ?

@gcampax gcampax merged commit 0355aa5 into master Oct 3, 2019
@gcampax gcampax deleted the wip/prim-expander branch October 3, 2019 17:04
gcampax pushed a commit that referenced this pull request Jun 23, 2020
Add link to register matrix account when there is no messaging account
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

Successfully merging this pull request may close these issues.

None yet

2 participants