Using NOT_IN and IN inside the same token in Matcher #10473
-
I am trying to write a pattern that distinguishes 'What do you think of the war?" from "What do you think would be a good case?' and 'What do you think that Mary likes?'. In other words, a pattern where the POS of the word after 'think' can be "PREP" but not "AUX"&"SCONJ". The pattern below is not helping: [{'LOWER': {'IN': ['what','who','which']}, 'DEP': {"IN": ["nsubj","nsubjpass","pobj","dobj","det","attr",'dep','dat']}}, {'LOWER': 'else',"OP": "?"}, {'POS': 'AUX'},{'LEMMA': 'you'}, {'LEMMA': 'think'},{'POS':{"NOT_IN":['AUX',"DET","POSS","PROPN","ADJ"]},"POS":"PREP"}], Is it possible to use NOT_IN and IN in a pattern for a single token that follows 'think' above? Thanks in advance. -Atakan |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
It's technically possible to use Be aware that if you use the same key twice in a dictionary definition, the last value is used:
|
Beta Was this translation helpful? Give feedback.
-
Thank you very much Adriane. That makes sense. |
Beta Was this translation helpful? Give feedback.
It's technically possible to use
NOT_IN
andIN
for the same value in a token dict, but it doesn't really make sense as a pattern. I don't think there's any difference to just usingIN
with only the values that you want to match?Be aware that if you use the same key twice in a dictionary definition, the last value is used: