-
Notifications
You must be signed in to change notification settings - Fork 42
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
Prefix completions with custom python filter #287
Conversation
0411c84
to
83c97bc
Compare
…move unfinished bounded weighted state traverser 2.
37e1eb1
to
6332f7e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
/** | ||
* Set the minimum weight states must be greater or equal to. | ||
* | ||
* Only available for WeightedTransition specialization. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this method is only available to WeightedTransition
, should we prevent calls to it with something like throw std:: logic_error("Not implemented")
instead of having a method that is no-op ?
Am good with this as well, just wanna see if this was intentional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had it like this in an earlier version, but I reverted, because it broke completions on dictionaries without weights (test case should exist, so it is easy to find out).
I will try this once more and make a new PR if it doesn't break this case.
So many changes, at some point I lost track.
this PR combines #283 and #284 and puts custom python filtering on completions on top.
It exposes a
set_min_weight
method to influence/shortcut DFS traversal during matching. Example for a custom top-5 implementation:Outdated:
After some discussion the following idea has been dropped.
It allows on the fly filtering and custom weight adjustment from python: