0
私は例で見てきたように、スペイシー英語モデルを再教育しようとすると、それは失敗を失敗:再訓練スペイシー依存モデルが
Python 3.6.2 (v3.6.2:5fd33b5926, Jul 16 2017, 20:11:06)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import spacy
>>> from spacy.tokens import Doc
>>> from spacy.gold import GoldParse
>>>
>>> nlp = spacy.load('en')
>>> doc = Doc(nlp.vocab, words=['Who', 'is', 'Shaka', 'Khan', '?'])
>>> gold = GoldParse(doc, [(1, 'nsubj'), (1, 'ROOT'), (3, 'compound'), (1, 'dobj'), (1, 'punct')])
>>> nlp.parser(doc)
>>> gold
<spacy.gold.GoldParse object at 0x114008a58>
>>> nlp.parser.update(doc, gold)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "spacy/syntax/parser.pyx", line 320, in spacy.syntax.parser.Parser.update (spacy/syntax/parser.cpp:10286)
File "spacy/syntax/arc_eager.pyx", line 357, in spacy.syntax.arc_eager.ArcEager.preprocess_gold (spacy/syntax/arc_eager.cpp:7888)
AttributeError: 'NoneType' object has no attribute 'upper'
私はここで間違って何をしているのですか?どんな助けもありがとうございます。