mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 01:16:28 +03:00
Fix download commands in error messages (see #946)
This commit is contained in:
parent
51882ee2b8
commit
e71a1f4bd0
|
@ -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
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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.
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user