From d7560047c5038fb4bf8a3f3a52b7a02ab6e88b25 Mon Sep 17 00:00:00 2001 From: ines Date: Sat, 22 Jul 2017 15:24:31 +0200 Subject: [PATCH 1/3] Fix version --- website/docs/api/annotation.jade | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/docs/api/annotation.jade b/website/docs/api/annotation.jade index 30080dfd9..d4b01a819 100644 --- a/website/docs/api/annotation.jade +++ b/website/docs/api/annotation.jade @@ -39,7 +39,7 @@ p +h(2, "pos-tagging") Part-of-speech Tagging +infobox("Tip: Understanding tags") - | In spaCy v1.8.3+, you can also use #[code spacy.explain()] to get the + | In spaCy v1.9+, you can also use #[code spacy.explain()] to get the | description for the string representation of a tag. For example, | #[code spacy.explain("RB")] will return "adverb". @@ -71,7 +71,7 @@ p +h(2, "dependency-parsing") Syntactic Dependency Parsing +infobox("Tip: Understanding labels") - | In spaCy v1.8.3+, you can also use #[code spacy.explain()] to get the + | In spaCy v1.9+, you can also use #[code spacy.explain()] to get the | description for the string representation of a label. For example, | #[code spacy.explain("prt")] will return "particle". @@ -80,7 +80,7 @@ include _annotation/_dep-labels +h(2, "named-entities") Named Entity Recognition +infobox("Tip: Understanding entity types") - | In spaCy v1.8.3+, you can also use #[code spacy.explain()] to get the + | In spaCy v1.9+, you can also use #[code spacy.explain()] to get the | description for the string representation of an entity label. For example, | #[code spacy.explain("LANGUAGE")] will return "any named language". From de25bad036c7ddcf30181e71c4c1750ff6b93c18 Mon Sep 17 00:00:00 2001 From: ines Date: Sat, 22 Jul 2017 15:29:10 +0200 Subject: [PATCH 2/3] Use lower min version for requests dependency (fixes #1137) Ensure compatibility with docker-compose and other packages --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 20c587841..fe273ee53 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ six html5lib==1.0b8 ujson>=1.35 dill>=0.2,<0.3 -requests>=2.13.0,<3.0.0 +requests>=2.11.0,<3.0.0 regex==2017.4.5 ftfy>=4.4.2,<5.0.0 pytest>=3.0.6,<4.0.0 From 7c4bf9994d23f5b07ebed24034b8d8eee2eaa6f6 Mon Sep 17 00:00:00 2001 From: ines Date: Sat, 22 Jul 2017 15:40:12 +0200 Subject: [PATCH 3/3] Add note on requirements and preventing model re-downloads (closes #1143) --- website/docs/usage/models.jade | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/website/docs/usage/models.jade b/website/docs/usage/models.jade index 42a3c0bbf..2d0f83663 100644 --- a/website/docs/usage/models.jade +++ b/website/docs/usage/models.jade @@ -198,6 +198,37 @@ p nlp = en_core_web_md.load() doc = nlp(u'This is a sentence.') ++h(3, "models-download") Downloading and requiring model dependencies + +p + | spaCy's built-in #[+api("cli#download") #[code download]] command + | is mostly intended as a convenient, interactive wrapper. It performs + | compatibility checks and prints detailed error messages and warnings. + | However, if you're downloading models as part of an automated build + | process, this only adds an unecessary layer of complexity. If you know + | which models your application needs, you should be specifying them directly. + ++aside("Prevent re-downloading models") + | If you're installing a model from a URL, pip will usually re-download and + | re-install the package, even if you already have a matching + | version installed. To prevent this, simply add #[code #egg=] and the + | package name after the URL, e.g. #[code #egg=en_core_web_sm] or + | #[code #egg=en_core_web_sm-1.2.0]. This tells pip which package and version + | you're trying to download, and will skip the package if a matching + | installation is found. + +p + | Because all models are valid Python packages, you can add them to your + | application's #[code requirements.txt]. If you're running your own + | internal PyPi installation, you can simply upload the models there. pip's + | #[+a("https://pip.pypa.io/en/latest/reference/pip_install/#requirements-file-format") requirements file format] + | supports both package names to download via a PyPi server, as well as direct + | URLs. + ++code("requirements.txt", "text"). + spacy>=1.8.0,<2.0.0 + -e #{gh("spacy-models")}/releases/download/en_core_web_sm-1.2.0/en_core_web_sm-1.2.0.tar.gz#egg=en_core_web_sm-1.2.0 + +h(2, "own-models") Using your own models p