From 14148cd147e616c3ca3ddeb8a372b2984f22e998 Mon Sep 17 00:00:00 2001 From: ines Date: Mon, 7 May 2018 21:24:35 +0200 Subject: [PATCH] Fix formatting and wording --- CONTRIBUTING.md | 2 +- website/README.md | 2 -- website/usage/_adding-languages/_language-data.jade | 2 +- website/usage/_install/_troubleshooting.jade | 2 +- .../usage/_linguistic-features/_dependency-parse.jade | 4 ++-- .../usage/_linguistic-features/_named-entities.jade | 2 +- website/usage/_linguistic-features/_tokenization.jade | 2 +- website/usage/_models/_install.jade | 8 ++++---- website/usage/_models/_production.jade | 2 +- website/usage/_spacy-101/_tokenization.jade | 2 +- website/usage/_visualizers/_html.jade | 11 ++++++----- 11 files changed, 19 insertions(+), 20 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c06196c6a..6f5890cde 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -73,7 +73,7 @@ so it only becomes visible on click, making the issue easier to read and follow. ### Issue labels To distinguish issues that are opened by us, the maintainers, we usually add a -💫 to the title. [See this page](https://github.com/explosion/spaCy/labels) +💫 to the title. [See this page](https://github.com/explosion/spaCy/labels) for an overview of the system we use to tag our issues and pull requests. ## Contributing to the code base diff --git a/website/README.md b/website/README.md index e0b7d53fc..15e73c651 100644 --- a/website/README.md +++ b/website/README.md @@ -27,8 +27,6 @@ The docs can always use another example or more detail, and they should always b While all page content lives in the `.jade` files, article meta (page titles, sidebars etc.) is stored as JSON. Each folder contains a `_data.json` with all required meta for its files. -For simplicity, all sites linked in the [tutorials](https://spacy.io/docs/usage/tutorials) and [showcase](https://spacy.io/docs/usage/showcase) are also stored as JSON. So in order to edit those pages, there's no need to dig into the Jade files – simply edit the [`_data.json`](docs/usage/_data.json). - ### Markup language and conventions Jade/Pug is a whitespace-sensitive markup language that compiles to HTML. Indentation is used to nest elements, and for template logic, like `if`/`else` or `for`, mainly used to iterate over objects and arrays in the meta data. It also allows inline JavaScript expressions. diff --git a/website/usage/_adding-languages/_language-data.jade b/website/usage/_adding-languages/_language-data.jade index eedf343e6..94075cb31 100644 --- a/website/usage/_adding-languages/_language-data.jade +++ b/website/usage/_adding-languages/_language-data.jade @@ -4,7 +4,7 @@ p | The individual components #[strong expose variables] that can be imported | within a language module, and added to the language's #[code Defaults]. | Some components, like the punctuation rules, usually don't need much - | customisation and can simply be imported from the global rules. Others, + | customisation and can be imported from the global rules. Others, | like the tokenizer and norm exceptions, are very specific and will make | a big difference to spaCy's performance on the particular language and | training a language model. diff --git a/website/usage/_install/_troubleshooting.jade b/website/usage/_install/_troubleshooting.jade index 2135f323a..5af81a632 100644 --- a/website/usage/_install/_troubleshooting.jade +++ b/website/usage/_install/_troubleshooting.jade @@ -39,7 +39,7 @@ p | this. The above error mostly occurs when doing a system-wide installation, | which will create the symlinks in a system directory. Run the | #[code download] or #[code link] command as administrator (on Windows, - | simply right-click on your terminal or shell ans select "Run as + | you can either right-click on your terminal or shell ans select "Run as | Administrator"), or use a #[code virtualenv] to install spaCy in a user | directory, instead of doing a system-wide installation. diff --git a/website/usage/_linguistic-features/_dependency-parse.jade b/website/usage/_linguistic-features/_dependency-parse.jade index a540cf33e..1ccd0c292 100644 --- a/website/usage/_linguistic-features/_dependency-parse.jade +++ b/website/usage/_linguistic-features/_dependency-parse.jade @@ -220,8 +220,8 @@ p p | The best way to understand spaCy's dependency parser is interactively. - | To make this easier, spaCy v2.0+ comes with a visualization module. Simply - | pass a #[code Doc] or a list of #[code Doc] objects to + | To make this easier, spaCy v2.0+ comes with a visualization module. You + | can pass a #[code Doc] or a list of #[code Doc] objects to | displaCy and run #[+api("top-level#displacy.serve") #[code displacy.serve]] to | run the web server, or #[+api("top-level#displacy.render") #[code displacy.render]] | to generate the raw markup. If you want to know how to write rules that diff --git a/website/usage/_linguistic-features/_named-entities.jade b/website/usage/_linguistic-features/_named-entities.jade index 3f39c3d2d..d69cb545d 100644 --- a/website/usage/_linguistic-features/_named-entities.jade +++ b/website/usage/_linguistic-features/_named-entities.jade @@ -195,7 +195,7 @@ p | lets you explore an entity recognition model's behaviour interactively. | If you're training a model, it's very useful to run the visualization | yourself. To help you do that, spaCy v2.0+ comes with a visualization - | module. Simply pass a #[code Doc] or a list of #[code Doc] objects to + | module. You can pass a #[code Doc] or a list of #[code Doc] objects to | displaCy and run #[+api("top-level#displacy.serve") #[code displacy.serve]] to | run the web server, or #[+api("top-level#displacy.render") #[code displacy.render]] | to generate the raw markup. diff --git a/website/usage/_linguistic-features/_tokenization.jade b/website/usage/_linguistic-features/_tokenization.jade index 88688873e..948ec0ad3 100644 --- a/website/usage/_linguistic-features/_tokenization.jade +++ b/website/usage/_linguistic-features/_tokenization.jade @@ -274,7 +274,7 @@ p | In spaCy v1.x, you had to add a custom tokenizer by passing it to the | #[code make_doc] keyword argument, or by passing a tokenizer "factory" | to #[code create_make_doc]. This was unnecessarily complicated. Since - | spaCy v2.0, you can simply write to #[code nlp.tokenizer]. If your + | spaCy v2.0, you can write to #[code nlp.tokenizer] instead. If your | tokenizer needs the vocab, you can write a function and use | #[code nlp.vocab]. diff --git a/website/usage/_models/_install.jade b/website/usage/_models/_install.jade index befd9bc6a..5fcece9fc 100644 --- a/website/usage/_models/_install.jade +++ b/website/usage/_models/_install.jade @@ -19,15 +19,15 @@ include _install-basics +h(3, "download-pip") Installation via pip p - | To download a model directly using #[+a("https://pypi.python.org/pypi/pip") pip], - | simply point #[code pip install] to the URL or local path of the archive + | To download a model directly using #[+a("https://pypi.python.org/pypi/pip") pip], + | point #[code pip install] to the URL or local path of the archive | file. To find the direct link to a model, head over to the | #[+a(gh("spacy-models") + "/releases") model releases], right click on the archive | link and copy it to your clipboard. +code(false, "bash"). # with external URL - pip install #{gh("spacy-models")}/releases/download/en_core_web_md-1.2.0/en_core_web_md-1.2.0.tar.gz + pip install #{gh("spacy-models")}/releases/download/en_core_web_sm-2.0.0/en_core_web_sm-2.0.0.tar.gz # with local file pip install /Users/you/en_core_web_md-1.2.0.tar.gz @@ -69,7 +69,7 @@ p p | You can place the #[strong model package directory] anywhere on your - | local file system. To use it with spaCy, simply assign it a name by + | local file system. To use it with spaCy, assign it a name by | creating a #[+a("#usage") shortcut link] for the data directory. +h(3, "usage") Using models with spaCy diff --git a/website/usage/_models/_production.jade b/website/usage/_models/_production.jade index 1c64b37e5..c5a6cc587 100644 --- a/website/usage/_models/_production.jade +++ b/website/usage/_models/_production.jade @@ -26,7 +26,7 @@ p 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 + | internal PyPi installation, you can 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. diff --git a/website/usage/_spacy-101/_tokenization.jade b/website/usage/_spacy-101/_tokenization.jade index 7a67e7a97..9eaaa1b60 100644 --- a/website/usage/_spacy-101/_tokenization.jade +++ b/website/usage/_spacy-101/_tokenization.jade @@ -5,7 +5,7 @@ p | segments it into words, punctuation and so on. This is done by applying | rules specific to each language. For example, punctuation at the end of a | sentence should be split off – whereas "U.K." should remain one token. - | Each #[code Doc] consists of individual tokens, and we can simply iterate + | Each #[code Doc] consists of individual tokens, and we can iterate | over them: +code-exec. diff --git a/website/usage/_visualizers/_html.jade b/website/usage/_visualizers/_html.jade index e95b3527a..7e8daaba8 100644 --- a/website/usage/_visualizers/_html.jade +++ b/website/usage/_visualizers/_html.jade @@ -72,10 +72,11 @@ p | you want to visualize output from other libraries, like | #[+a("http://www.nltk.org") NLTK] or | #[+a("https://github.com/tensorflow/models/tree/master/research/syntaxnet") SyntaxNet]. - | Simply convert the dependency parse or recognised entities to displaCy's - | format and set #[code manual=True] on either #[code render()] or - | #[code serve()]. When setting #[code ents] manually, make sure to supply - | them in the right order, i.e. starting with the lowest start position. + | If you set #[code manual=True] on either #[code render()] or + | #[code serve()], you can pass in data in displaCy's format (instead of + | #[code Doc] objects). When setting #[code ents] manually, make sure to + | supply them in the right order, i.e. starting with the lowest start + | position. +aside-code("Example"). ex = [{'text': 'But Google is starting from behind.', @@ -109,7 +110,7 @@ p | If you want to use the visualizers as part of a web application, for | example to create something like our | #[+a(DEMOS_URL + "/displacy") online demo], it's not recommended to - | simply wrap and serve the displaCy renderer. Instead, you should only + | only wrap and serve the displaCy renderer. Instead, you should only | rely on the server to perform spaCy's processing capabilities, and use | #[+a(gh("displacy")) displaCy.js] to render the JSON-formatted output.