v3 PhraseMatcher() greedy option? #6741
telesphore
started this conversation in
New Features & Project Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've been experimenting with spacyV3 and I noticed that you have a new "greedy" option on
Matcher.add()
. Would it be possible to put one onPhraseMatcher.add()
(or evenPhraseMatcher()
itself)?For instance:
Will match both phrases but what I really want is the longest one "red-brown".
I currently add a custom component that uses
filter_spans()
to do this but others may find this option handy too.Beta Was this translation helpful? Give feedback.
All reactions