E
Size: a a a
E
AK
Е
DD
Е
D
DB
@banofbot
B
AW
SP
AO
АЗ
АЗ
АЖ
import spacy
from spacy.matcher import Matcher
nlp = spacy.load("en_core_web_sm")
matcher = Matcher(nlp.vocab)
pattern = [{"POS": "ADJ"}, {"POS": "NOUN"}]
matcher.add("adj-noun", [pattern])
doc = nlp("I saw a beautiful cat")
matches = matcher(doc)
for match_id, start, end in matches:
span = doc[start:end]
print(span.text)
АЗ
АЗ
АЖ
АЗ