Closed azarezade closed 6 years ago
I am trying to train a model for Persian (fa) language. I prepared the freqs, brown cluster and word2vec data using the instructions here. Then following the doc, I used:
python -m spacy init-model fa data/model/fa/ data/model/fa/fa_wiki.freqs -c data/model/fa/brown/paths -v data/model/fa/fa_wiki.word2vec
But it returns error:
Counting frequencies... 923130it [00:02, 309685.80it/s] Reading vectors... 108821it [00:11, 9870.09it/s] Reading clusters... 1047705it [00:47, 22187.37it/s] Creating model... 100%|██████████████████████████████| 36888/36888 [00:01<00:00, 21654.38it/s] Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/home/user/Documents/spacy-dev-resources/.venv/lib/python2.7/site-packages/spacy/__main__.py", line 31, in <module> plac.call(commands[command], sys.argv[1:]) File "/home/user/Documents/spacy-dev-resources/.venv/local/lib/python2.7/site-packages/plac_core.py", line 328, in call cmd, result = parser.consume(arglist) File "/home/user/Documents/spacy-dev-resources/.venv/local/lib/python2.7/site-packages/plac_core.py", line 207, in consume return cmd, self.func(*(args + varargs + extraopts), **kwargs) File "/home/user/Documents/spacy-dev-resources/.venv/local/lib/python2.7/site-packages/spacy/cli/init_model.py", line 42, in init_model nlp = create_model(lang, probs, oov_prob, clusters, vectors_data, vector_keys, prune_vectors) File "/home/user/Documents/spacy-dev-resources/.venv/local/lib/python2.7/site-packages/spacy/cli/init_model.py", line 73, in create_model nlp.vocab.vectors = Vectors(data=vectors_data, keys=vector_keys) File "vectors.pyx", line 56, in spacy.vectors.Vectors.__init__ AttributeError: 'tuple' object has no attribute 'shape'
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.
I am trying to train a model for Persian (fa) language. I prepared the freqs, brown cluster and word2vec data using the instructions here. Then following the doc, I used:
But it returns error:
Environment