opennlpallennlpflair

flair import failing on mac ubuntu and google colab


i am trying to use flair nlp framework ,

https://github.com/flairNLP/flair

but getting error

# load the NER tagger
tagger = SequenceTagger.load('ner')

tried on local , remote and other machine . all failing as its not able to download a model from s3 .google colab also gives same error .

all give error message as:

OSError: HEAD request failed for url https://s3.eu-central-1.amazonaws.com/alan-nlp/resources/models-v0.4/NER-conll03-english/en-ner-conll03-v0.4.pt with status code 301.

.


Solution

  • I was having the same issue, I don't know what happen with the link but I found another one.

    You can look flair master repo https://github.com/flairNLP/flair/blob/master/flair/models/sequence_tagger_model.py on the def _fetch_model(model_name) line 971. There are using another path already "https://nlp.informatik.hu-berlin.de/resources/models", so they change to that path instead of alan-nlp.

    So you can find your model here https://nlp.informatik.hu-berlin.de/resources/models/ner/