Fix download commands in error messages (see #946)

This commit is contained in:
ines 2017-04-01 10:19:32 +02:00
parent d4a59c254b
commit 42382d5692
4 changed files with 5 additions and 5 deletions

View File

@ -134,7 +134,7 @@ 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.%s.download all\n"
"\npython -m spacy download %s\n"
"to install the data." % self.vocab.lang
)

View File

@ -394,7 +394,7 @@ 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.%s.download all\n"
"\npython -m spacy download %s\n"
"to install the data" % self.vocab.lang)
# Accumulate the result before beginning to iterate over it. This prevents
# the tokenisation from being changed out from under us during the iteration.
@ -427,7 +427,7 @@ 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.%s.download all\n"
"\npython -m spacy download %s\n"
"to install the data" % self.vocab.lang)
cdef int i
start = 0

View File

@ -210,7 +210,7 @@ cdef class Span:
raise ValueError(
"noun_chunks requires the dependency parse, which "
"requires data to be installed. If you haven't done so, run: "
"\npython -m spacy.%s.download all\n"
"\npython -m spacy download %s\n"
"to install the data" % self.vocab.lang)
# Accumulate the result before beginning to iterate over it. This prevents
# the tokenisation from being changed out from under us during the iteration.

View File

@ -236,7 +236,7 @@ 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.%s.download all\n"
"\npython -m spacy download %s\n"
"to install the data." % self.vocab.lang
)
vector_view = <float[:length,]>self.c.lex.vector