i am trying to learn the Spacy’s Matcher class for pattern matching.
when i am trying to match the word “solar” in the sentence it is not matching. Even though there are multiple solar words that are present.
here is the pattern: pattern1 = [[{"LOWER":"SOLAR"}]]
i added to te matcher: matcher.add("solar", pattern1)
doc : nlp('solar Solarpowered energy runs solar solar-powered cars solar .')
even though there are multiple solar words in the sentence it is not getting identified.
for match_id, start, end in matches:
matched_pattern = nlp.vocab.strings[match_id]
text =doc[start:end]
print(text.text, start, end, matched_pattern)
I am getting empty result it is not identifying anyg solar word.
i tried multiple patterns but nothing worked to identify single word “Solar”. It can able to identify solar power but not just solar. Can anyone help me here.