Fix download commands in error messages (see #946)

This commit is contained in:
ines 2017-04-01 10:19:32 +02:00 committed by Matthew Honnibal
parent 51882ee2b8
commit e71a1f4bd0
4 changed files with 5 additions and 5 deletions

View File

@ -134,7 +134,7 @@ cdef class Lexeme:
raise ValueError( raise ValueError(
"Word vectors set to length 0. This may be because the " "Word vectors set to length 0. This may be because the "
"data is not installed. If you haven't already, run" "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 "to install the data." % self.vocab.lang
) )

View File

@ -394,7 +394,7 @@ cdef class Doc:
raise ValueError( raise ValueError(
"noun_chunks requires the dependency parse, which " "noun_chunks requires the dependency parse, which "
"requires data to be installed. If you haven't done so, run: " "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) "to install the data" % self.vocab.lang)
# Accumulate the result before beginning to iterate over it. This prevents # Accumulate the result before beginning to iterate over it. This prevents
# the tokenisation from being changed out from under us during the iteration. # the tokenisation from being changed out from under us during the iteration.
@ -427,7 +427,7 @@ cdef class Doc:
raise ValueError( raise ValueError(
"sentence boundary detection requires the dependency parse, which " "sentence boundary detection requires the dependency parse, which "
"requires data to be installed. If you haven't done so, run: " "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) "to install the data" % self.vocab.lang)
cdef int i cdef int i
start = 0 start = 0

View File

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

View File

@ -236,7 +236,7 @@ cdef class Token:
raise ValueError( raise ValueError(
"Word vectors set to length 0. This may be because the " "Word vectors set to length 0. This may be because the "
"data is not installed. If you haven't already, run" "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 "to install the data." % self.vocab.lang
) )
vector_view = <float[:length,]>self.c.lex.vector vector_view = <float[:length,]>self.c.lex.vector