spacy-operator-quantifier

05-10-2022 || 00:48
Tags: #spacy #nlp

spacy-operator-quantifier

pattern = [
   {"LEMMA": "buy"},
   {"POS": "DET", "OP": "?"}, # optional: match 0 or 1 times
   {"POS": "NOUN"}
]

The above pattern will match bought a smartphone, buying apps

There are different operator and quantifiers in spacy.


References