I'm tying to to detect simple location with NER algorithm, and I'm getting semi-corrected results:
from flair.data import Sentence
from flair.models import SequenceTagger
tagger = SequenceTagger.load('ner')
text = 'Jackson leaves at north Carolina'
sentence = Sentence(text)
tagger.predict(sentence)
for entity in sentence.get_spans('ner'):
print(entity)
Output:
Span [1]: "Jackson" [− Labels: PER (0.9996)]
Span [5]: "Carolina" [− Labels: LOC (0.7363)]
I was expecting to receive "north Carolina".
- Can FLAIR detects full location description ? (what do we need for it ?)
- Is there any NER algorithm that cat detects full location description ?