I'm trying to match a specific pattern: any verb with a noun ending with a s, t or l. E.g.: Like cat, Eat meal, Make Spices
How Can i do this?
I Know i was doing this:
nlp =spacy.load("en_core_web_sm")
matcher = Matcher(nlp.vocable)
pattern = [{"POS": "VERB"}, {"POS": "NOUN"}]
matcher.add("mypattern", [pattern])
doc = nlp(Verbwithnoun)
matches = matcher(doc)
for match_id, start, end in matches:
string_id = nlp.vocab.strings[match_id]
print(doc[start:end)
But that prints all verb with nouns not the noun ending with a t,l or s. How Can i get spacy to match only specific nouns ending with a t,l or s?