Natural-Language-Processing-Tutorials
Natural-Language-Processing-Tutorials copied to clipboard
@plac.annotations - SyntaxError
Hi! @plac.annotations cell gives me this error:
File "<ipython-input-293-72f554ad94b1>", line 5 n_iter=("Number of training iterations", "option", "n", int)) ^ SyntaxError: unexpected EOF while parsing
Any suggestion why? I'm using Python 3.
Removing the plac.annotations decorator and converting plac.call(main) into main() might do the trick. im guessing its a similar syntax error when run on jupyter-notebook. https://stackoverflow.com/questions/52384517/training-a-new-entity-type-with-spacy
I am facing the same error , I want to execute (https://github.com/explosion/spaCy/tree/master/examples/training)
this in Google colab or Jupyter. How to remove the plac.annotations
Removing the plac.annotations decorator and converting plac.call(main) into main() might do the trick. im guessing its a similar syntax error when run on jupyter-notebook. https://stackoverflow.com/questions/52384517/training-a-new-entity-type-with-spacy
Could you show an example of this?
Removing the plac.annotations decorator and converting plac.call(main) into main() might do the trick. im guessing its a similar syntax error when run on jupyter-notebook. https://stackoverflow.com/questions/52384517/training-a-new-entity-type-with-spacy
Could you show an example of this?
I am afraid I can't do that anymore, the document I was working on got overwritten a year ago. But if you have any issues, would be happy to help
Removing the plac.annotations decorator and converting plac.call(main) into main() might do the trick. im guessing its a similar syntax error when run on jupyter-notebook. https://stackoverflow.com/questions/52384517/training-a-new-entity-type-with-spacy
Could you show an example of this?
I am afraid I can't do that anymore, the document I was working on got overwritten a year ago. But if you have any issues, would be happy t
Removing the plac.annotations decorator and converting plac.call(main) into main() might do the trick. im guessing its a similar syntax error when run on jupyter-notebook. https://stackoverflow.com/questions/52384517/training-a-new-entity-type-with-spacy
Could you show an example of this?
I am afraid I can't do that anymore, the document I was working on got overwritten a year ago. But if you have any issues, would be happy to help
I am still not getting about main(). can you show a piece of code?
@MahimaBarot would love to, but as mentioned above, the documents I have worked on got overwritten. Plus, the python script provided by the developers are no longer available. If you have a sample script that you were working on then that would be helpful...
At best, the last I could recall and any resemblance of the code at the end looks something like this.
if __name__ == '__main__':
import plac
plac.call(main)
drop the plac.call function and call the main
function directly, as such.
if __name__ == '__main__':
main()