Spacy Basic Usage Error
Using Spacy v1.1.2 the following code errors out
import spacy
en_nlp = spacy.load('en', parser=True)
en_doc = en_nlp(u'Hello, world. Here are two sentences.')
with an error
File "/usr/local/lib/python2.7/site-packages/spacy/language.py", line 313, in __call__
proc(doc)
TypeError: 'bool' object is not callable
parser=True is already the default, you don't need to specify it. When you specify a value, it's used as the parser, but True is not a function (not callable).
I am guessing this has changed after an update. Cool thanks
This is so weird.
spacy definitely needs better documentation for initiating the English class, looking at the source code (Language.__init__) the overrides kwargs implementation doesn't help at all. It is not clear if default values are flags or objects of certain type. The big problem with SpaCy's API is that it is hiding everything from the end-user (aka you just load this object, it does everything for you!) An expert NLP user would definitely wanna see easy interface to disable/enable taggers, parsers, vectors, entity etc... There is no example in the documentation about initiating the English class, except English() examples. This also makes it nearly impossible to inherit from the English class.
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.