From e635e1f6f4dd3e67ed7b7976eb4b3a3ac118a674 Mon Sep 17 00:00:00 2001 From: ines Date: Sat, 18 Mar 2017 15:24:42 +0100 Subject: [PATCH] Update docs to reflect new commands --- website/docs/usage/index.jade | 2 +- website/docs/usage/lightning-tour.jade | 2 +- website/docs/usage/models.jade | 28 +++++++++++++++----------- website/index.jade | 2 +- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/website/docs/usage/index.jade b/website/docs/usage/index.jade index b4961746d..ee2e6f544 100644 --- a/website/docs/usage/index.jade +++ b/website/docs/usage/index.jade @@ -17,7 +17,7 @@ p | and available models, see the #[+a("/docs/usage/models") docs on models]. +code.o-no-block. - python -m spacy.download en + python -m spacy download en >>> import spacy >>> nlp = spacy.load('en') diff --git a/website/docs/usage/lightning-tour.jade b/website/docs/usage/lightning-tour.jade index ba0adaa6e..31982d516 100644 --- a/website/docs/usage/lightning-tour.jade +++ b/website/docs/usage/lightning-tour.jade @@ -9,7 +9,7 @@ p +h(2, "models") Install and load models +code(false, "bash"). - python -m spacy.download en + python -m spacy download en +code. import spacy diff --git a/website/docs/usage/models.jade b/website/docs/usage/models.jade index 3b1bb5f7d..d45d8d45e 100644 --- a/website/docs/usage/models.jade +++ b/website/docs/usage/models.jade @@ -21,7 +21,7 @@ p +aside-code("Quickstart"). # Install spaCy and download English model pip install spacy - python -m spacy.download en + python -m spacy download en # Usage in Python import spacy @@ -90,14 +90,14 @@ p +code(false, "bash"). # out-of-the-box: download best-matching default model - python -m spacy.download en - python -m spacy.download de + python -m spacy download en + python -m spacy download de # download best-matching version of specific model for your spaCy installation - python -m spacy.download en_core_web_md + python -m spacy download en_core_web_md # download exact model version (doesn't create shortcut link) - python -m spacy.download en_core_web_md-1.2.0 --direct + python -m spacy download en_core_web_md-1.2.0 --direct p | The download command will #[+a("#download-pip") install the model] via @@ -108,7 +108,7 @@ p +code(false, "bash"). pip install spacy - python -m spacy.download en + python -m spacy download en +code. import spacy @@ -172,7 +172,7 @@ p | load them by name. +code(false, "bash"). - python -m spacy.link [package name or path] [shortcut] [--force] + python -m spacy link [package name or path] [shortcut] [--force] p | The first argument is the package name (if the model was installed via @@ -182,10 +182,10 @@ p +code("Examples", "bash"). # set up shortcut link to load installed package as "en_default" - python -m spacy.link en_core_web_md en_default + python -m spacy link en_core_web_md en_default # set up shortcut link to load local model as "my_amazing_model" - python -m spacy.link /Users/you/model my_amazing_model + python -m spacy link /Users/you/model my_amazing_model +h(3, "usage-loading") Loading models @@ -198,14 +198,18 @@ p doc = nlp(u'This is a sentence.') p - | You can also use the #[code info()] method to print a model's meta data + | You can also use the #[info] command or #[code info()] method to print a model's meta data | before loading it. Each #[code Language] object returned by #[code spacy.load()] - | also exposes the model's meta data as the attribute #[code meta]: + | also exposes the model's meta data as the attribute #[code meta]. + ++code(false, "bash"). + python -m spacy info en + # model meta data +code. import spacy spacy.info('en_default') - # JSON-formatted model meta data + # model meta data nlp = spacy.load('en_default') print(nlp.meta['version']) diff --git a/website/index.jade b/website/index.jade index 1a5cd0826..78a8302f9 100644 --- a/website/index.jade +++ b/website/index.jade @@ -66,7 +66,7 @@ include _includes/_mixins +grid +grid-col("two-thirds") +terminal("lightning_tour.py"). - # Install: pip install spacy && python -m spacy.download en + # Install: pip install spacy && python -m spacy download en import spacy # Load English tokenizer, tagger, parser, NER and word vectors