-
Good morning! I have a question about part 3 "Pattern matching". I just cannot get down the rule for matching syntactic dependencies, here is my pattern: dep_rule =[{'RIGHT_ID' : 'LEMMA' , 'RIGHT_ATTRS' :{'POS' : 'VERB'}}, Sorry for asking this kind of question, if possible I would just like to have tip where to start looking in order to solve this... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It's enough if you have only two items in the dep_rule list, RIGHT_ID and 1 LEFT_ID. It's also sufficient to just look for the lemma of the word without caring (at least in this case) if it has the 'POS': 'VERB' pattern. Looking at spaCy pattern formats manual page and examples helped me as well: https://spacy.io/api/matcher#patterns |
Beta Was this translation helpful? Give feedback.
It's enough if you have only two items in the dep_rule list, RIGHT_ID and 1 LEFT_ID. It's also sufficient to just look for the lemma of the word without caring (at least in this case) if it has the 'POS': 'VERB' pattern.
Looking at spaCy pattern formats manual page and examples helped me as well: https://spacy.io/api/matcher#patterns