Skip to content

Commit

Permalink
Fix download commands in error messages (see #946)
Browse files Browse the repository at this point in the history
  • Loading branch information
ines authored and honnibal committed Apr 1, 2017
1 parent 51882ee commit e71a1f4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion spacy/lexeme.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down
4 changes: 2 additions & 2 deletions spacy/tokens/doc.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spacy/tokens/span.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion spacy/tokens/token.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e71a1f4

Please sign in to comment.