Defining negative feature patterns in AttributeRuler #11755
-
Hello, I was wondering if it is possible to define a negative feature pattern in the AttributeRuler? By this, I mean the following. I have two lexical items written the same way but with different grammatical functions, and I want to assign different UPOS, XPOS labels to them: ša1 = relative pronoun -> "attrs": "POS:PRON", "TAG":"PRON" In telling the AttributeRuler how to handle these two items I can specify the pattern for ša2 as "ORTH":"ša", "DEP":"case", because ša2 always takes case as its syntactic dependency. But for ša1, there can be many dependency types it takes (nsubj, obl, iobj, etc.), all except case. So I would like to specify a pattern where "DEP" is anything but case. Is there a way to do this, perhaps using the '!' symbol? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Negative operators work as usual in AttributeRuler patterns. In this case you can use
|
Beta Was this translation helpful? Give feedback.
-
Ah, somehow I overlooked that operator in the API, and didn't see an example of it. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Uhm, not related to this topic, but did anyone else get mentioned by a scam NSFW bot? |
Beta Was this translation helpful? Give feedback.
Negative operators work as usual in AttributeRuler patterns. In this case you can use
NOT_IN
, like so:!
also works as usual, but it negates a whole pattern, while you only want to negate part of a pattern here, since you want to match in a positive fashion on the token text.