Mac ubuntu和Google Colab上的flair导入失败

我正在尝试使用flair nlp框架,

https://github.com/flairNLP/flair

但出现错误

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

在本地,远程和其他计算机上尝试过。全部失败,因为它无法从s3下载模型。googlecolab也给出了相同的错误。

所有错误消息均显示为:

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.

iCMS 回答:Mac ubuntu和Google Colab上的flair导入失败

我遇到了同样的问题,我不知道链接会发生什么,但是我发现了另一个问题。

您可以查看风骚主仓库https://github.com/flairNLP/flair/blob/master/flair/models/sequence_tagger_model.py 在def _fetch_model(model_name)行971上。 已经使用了另一个路径“ https://nlp.informatik.hu-berlin.de/resources/models”,因此它们更改为该路径,而不是alan-nlp。

所以您可以在https://nlp.informatik.hu-berlin.de/resources/models/ner/

处找到您的模型
本文链接:https://www.f2er.com/1659944.html

大家都在问