This commit is contained in:
Matthew Honnibal 2017-07-22 15:42:44 +02:00
commit 8ccf154413
3 changed files with 35 additions and 4 deletions

View File

@ -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

View File

@ -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".

View File

@ -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&gt;=1.8.0,&lt;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