1
$\begingroup$

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".

  1. Can FLAIR detects full location description ? (what do we need for it ?)
  2. Is there any NER algorithm that cat detects full location description ?
$\endgroup$
1
  • $\begingroup$ I just saw this question. The answer is essentially the same as the one I gave yesterday: the NER model uses the clues it finds in the sentence, and sometimes there aren't enough clues to find the correct answer. In this case I suspect that an capital N in "North" would have helped. $\endgroup$
    – Erwan
    Feb 6, 2022 at 18:37

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.