DependencyMatcher RIGHT_ATTRS
allow for only one sort of filtering
#10396
-
The DependencyMatcher documentation states: For example, I want to get a verb that is not in an infinitive form (
Which page or section is this issue related to?DependencyMatcher: https://spacy.io/api/dependencymatcher |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi, sorry that explanation is indeed a bit unclear. The dependency matcher matches exactly one token in each For this kind of pattern, you can use |
Beta Was this translation helpful? Give feedback.
Hi, sorry that explanation is indeed a bit unclear. The dependency matcher matches exactly one token in each
RIGHT_ATTRS
and the format is the same as the dict for exactly one token in aMatcher
pattern. TheMatcher
pattern is a list of token dicts.For this kind of pattern, you can use
NOT_IN
as in"MORPH": {"NOT_IN": ["VerbForm=Inf"]}
(or possibly use the subset/superset/intersects operators if it's not the full morph tag that you want to match). Even with aMatcher
pattern, you wouldn't be able to applyOP
to an individual feature. It always applies to the whole token pattern.