New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TokenVectorEncoder object is not iterable when running example in 2.0 alpha #1444
Comments
I think you might be using an outdated model that still has the spacy validate So simply downloading the latest |
I hope this is the case, but here is the output of validate:
I have been really looking forward to adding custom ner tags, so im eager |
Thanks for updating! I think I found the issue – try removing this line:
I think we may have forgotten to push the updated version of the example for the latest alpha release and models, sorry about that. Edit: Since the pipeline architecture has changed and
nlp.add_pipe(NeuralEntityRecognizer(nlp.vocab)) Will test this as soon as we have time and adjust it accordingly! |
Thanks @ines
Not quite sure that's how it's supposed to be done, but it works for me. |
Ah, thanks! 👍 You should be able to simply use ner = nlp.get_pipe('ner')
ner.add_label('ANIMAL') Or, probably cleaner: ner = NeuralEntityRecognizer(nlp.vocab)
ner.add_label('ANIMAL')
nlp.add_pipe(ner) |
That works too, thanks! |
Yay! Thanks for your help and feedback. If it's all working for you now, feel free to submit a PR to |
…y-type-example Fix #1444: fix training new entity type example
I can confirm that the fix works. |
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. |
Im trying to run one of the examples in 2.0.0 alpha, for extending a pre existing model with
custom ner tags avaliable here [1],
here is the error i get:
I expected to get this to work, as its already documented here [2],
all the models and spacy install are recent and fresh installs (21st october).
Your Environment
[ 1] https://github.com/explosion/spaCy/blob/develop/examples/training/train_new_entity_type.py
[ 2] https://alpha.spacy.io/usage/training#example-new-entity-type
The text was updated successfully, but these errors were encountered: