From e71a1f4bd04eba953323613d8b0581fdce42fa74 Mon Sep 17 00:00:00 2001 From: ines Date: Sat, 1 Apr 2017 10:19:32 +0200 Subject: [PATCH] Fix download commands in error messages (see #946) --- spacy/lexeme.pyx | 2 +- spacy/tokens/doc.pyx | 4 ++-- spacy/tokens/span.pyx | 2 +- spacy/tokens/token.pyx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spacy/lexeme.pyx b/spacy/lexeme.pyx index 1d5421d74..38789bfe9 100644 --- a/spacy/lexeme.pyx +++ b/spacy/lexeme.pyx @@ -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 ) diff --git a/spacy/tokens/doc.pyx b/spacy/tokens/doc.pyx index bffc8bbdf..d59317747 100644 --- a/spacy/tokens/doc.pyx +++ b/spacy/tokens/doc.pyx @@ -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 diff --git a/spacy/tokens/span.pyx b/spacy/tokens/span.pyx index fc5d26174..ee8a6af7f 100644 --- a/spacy/tokens/span.pyx +++ b/spacy/tokens/span.pyx @@ -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. diff --git a/spacy/tokens/token.pyx b/spacy/tokens/token.pyx index ccada6b16..a89b35eee 100644 --- a/spacy/tokens/token.pyx +++ b/spacy/tokens/token.pyx @@ -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 = self.c.lex.vector