spaCy
spaCy copied to clipboard
Code from Training Models documentation throws error
Copying and pasting the following code from https://spacy.io/usage/training#basics:
git clone https://github.com/UniversalDependencies/UD_Spanish-AnCora
mkdir ancora-json
python -m spacy convert UD_Spanish-AnCora/es_ancora-ud-train.conllu ancora-json
python -m spacy convert UD_Spanish-AnCora/es_ancora-ud-dev.conllu ancora-json
mkdir models
python -m spacy train es models ancora-json/es_ancora-ud-train.json ancora-json/es_ancora-ud-dev.json
It throws the following error:
corpus = GoldCorpus(train_path, dev_path, limit=n_examples)
File "gold.pyx", line 112, in spacy.gold.GoldCorpus.__init__
File "gold.pyx", line 125, in spacy.gold.GoldCorpus.write_msgpack
KeyError: 1
Spacy version: 2.1.3 Python version: 3.6.6 Platform: Darwin-17.7.0-x86_64-i386-64bit Running in a clean virtual environment
Thanks for the report. This seems to be the same issue as #3523, which was already fixed on master. In the meantime, you can add explicitly -t json to the spacy convert command.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.