我尝试训练自己的NER模型。我使用CLI训练命令,但出现此错误。
Traceback (most recent call last):
File "C:\Users\AppData\Local\Programs\Python\Python35\lib\runpy.py", line
193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\AppData\Local\Programs\Python\Python35\lib\runpy.py", line
85, in run_code
exec(code, run_globals)
File "C:\Users\AppData\Local\Programs\Python\Python35\lib\site-
packages\spacy_main.py", line 31, in
plac.call(commands[command])
File "C:\Users\AppData\Local\Programs\Python\Python35\lib\site-
packages\plac_core.py", line 328, in call
cmd, result = parser.consume(arglist)
File "C:\Users\AppData\Local\Programs\Python\Python35\lib\site-
packages\plac_core.py", line 207, in consume
return cmd, self.func(*(args + varargs + extraopts), **kwargs)
File "C:\Users\AppData\Local\Programs\Python\Python35\lib\site-
packages\spacy\cli\train.py", line 107, in train
train_docs = list(train_docs)
File "gold.pyx", line 207, in train_docs
File "gold.pyx", line 221, in iter_gold_docs
File "gold.pyx", line 235, in spacy.gold.GoldCorpus._make_docs
File "doc.pyx", line 177, in spacy.tokens.doc.Doc.init
File "doc.pyx", line 544, in spacy.tokens.doc.Doc.push_back
AssertionError
我使用Spacy JSON格式的数据。有谁知道头来解决这个问题?
非常感谢。
您的环境 空间版本:2.0.5 平台:Windows-10-10.0.16299-SP0 Python版本:3.5.4