OP: "!" in the DependencyPattern #8045
-
In dependencymatcher.pyx (line Why other "OP" values are not included? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The way the dependency matcher patterns work, the token dict parts of the pattern should result in matches that are exactly one token long so that it's possible to apply the dependency relation operators (in In order to have optional or negated parts of a dependency matcher pattern, we would need to extend the |
Beta Was this translation helpful? Give feedback.
The way the dependency matcher patterns work, the token dict parts of the pattern should result in matches that are exactly one token long so that it's possible to apply the dependency relation operators (in
REL_OP
). A relation like<<
only makes sense between two single tokens in the dependency tree, not between two groups of tokens or between missing tokens. The token dict pattern can obviously match multiple times in the doc, but each match should be exactly one token in length, which is why these operators are not allowed.In order to have optional or negated parts of a dependency matcher pattern, we would need to extend the
REL_OP
options to include optional/negated relations rather …