mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-24 17:06:29 +03:00
make error messages language independent
This commit is contained in:
parent
5080077097
commit
d65ef41d08
|
@ -74,8 +74,8 @@ cdef class Lexeme:
|
|||
raise ValueError(
|
||||
"Word vectors set to length 0. This may be because the "
|
||||
"data is not installed. If you haven't already, run"
|
||||
"\npython -m spacy.en.download all\n"
|
||||
"to install the data."
|
||||
"\npython -m spacy.%s.download all\n"
|
||||
"to install the data." % self.vocab.lang
|
||||
)
|
||||
|
||||
vector_view = <float[:length,]>self.c.vector
|
||||
|
|
|
@ -240,8 +240,8 @@ cdef class Doc:
|
|||
raise ValueError(
|
||||
"noun_chunks requires the dependency parse, which "
|
||||
"requires data to be installed. If you haven't done so, run: "
|
||||
"\npython -m spacy.en.download all\n"
|
||||
"to install the data")
|
||||
"\npython -m spacy.%s.download all\n"
|
||||
"to install the data" % self.vocab.lang)
|
||||
|
||||
yield from self.noun_chunks_iterator
|
||||
|
||||
|
@ -258,8 +258,8 @@ cdef class Doc:
|
|||
raise ValueError(
|
||||
"sentence boundary detection requires the dependency parse, which "
|
||||
"requires data to be installed. If you haven't done so, run: "
|
||||
"\npython -m spacy.en.download all\n"
|
||||
"to install the data")
|
||||
"\npython -m spacy.%s.download all\n"
|
||||
"to install the data" % self.vocab.lang)
|
||||
cdef int i
|
||||
start = 0
|
||||
for i in range(1, self.length):
|
||||
|
|
|
@ -163,8 +163,8 @@ cdef class Token:
|
|||
raise ValueError(
|
||||
"Word vectors set to length 0. This may be because the "
|
||||
"data is not installed. If you haven't already, run"
|
||||
"\npython -m spacy.en.download all\n"
|
||||
"to install the data."
|
||||
"\npython -m spacy.%s.download all\n"
|
||||
"to install the data." % self.vocab.lang
|
||||
)
|
||||
vector_view = <float[:length,]>self.c.lex.vector
|
||||
return numpy.asarray(vector_view)
|
||||
|
|
Loading…
Reference in New Issue
Block a user