Skip to content

Commit

Permalink
Get docs ready for v2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ines committed Nov 7, 2017
1 parent e02c84d commit a09c096
Show file tree
Hide file tree
Showing 21 changed files with 65 additions and 60 deletions.
22 changes: 11 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ First, [do a quick search](https://github.com/issues?q=+is%3Aissue+user%3Aexplos
to see if the issue has already been reported. If so, it's often better to just
leave a comment on an existing issue, rather than creating a new one. Old issues
also often include helpful tips and solutions to common problems. You should
also check the [troubleshooting guide](https://alpha.spacy.io/usage/#troubleshooting)
also check the [troubleshooting guide](https://spacy.io/usage/#troubleshooting)
to see if your problem is already listed there.

If you're looking for help with your code, consider posting a question on
Expand Down Expand Up @@ -55,12 +55,12 @@ even format them as Markdown to copy-paste into GitHub issues:
`python -m spacy info --markdown`.

* **Checking the model compatibility:** If you're having problems with a
[statistical model](https://alpha.spacy.io/models), it may be because to the
[statistical model](https://spacy.io/models), it may be because to the
model is incompatible with your spaCy installation. In spaCy v2.0+, you can check
this on the command line by running `spacy validate`.

* **Sharing a model's output, like dependencies and entities:** spaCy v2.0+
comes with [built-in visualizers](https://alpha.spacy.io/usage/visualizers) that
comes with [built-in visualizers](https://spacy.io/usage/visualizers) that
you can run from within your script or a Jupyter notebook. For some issues, it's
helpful to **include a screenshot** of the visualization. You can simply drag and
drop the image into GitHub's editor and it will be uploaded and included.
Expand Down Expand Up @@ -97,7 +97,7 @@ requests:

You don't have to be an NLP expert or Python pro to contribute, and we're happy
to help you get started. If you're new to spaCy, a good place to start is the
[spaCy 101 guide](https://alpha.spacy.io/usage/spacy-101) and the
[spaCy 101 guide](https://spacy.io/usage/spacy-101) and the
[`help wanted (easy)`](https://github.com/explosion/spaCy/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted+%28easy%29%22)
label, which we use to tag bugs and feature requests that are easy and
self-contained. If you've decided to take on one of these problems and you're
Expand All @@ -117,7 +117,7 @@ changes to spaCy's built-in methods. In contrast, a library of word
alignment functions could easily live as a separate package that depended on
spaCy — there's little difference between writing `import word_aligner` and
`import spacy.word_aligner`. spaCy v2.0+ makes it easy to implement
[custom pipeline components](https://alpha.spacy.io/usage/processing-pipelines#custom-components),
[custom pipeline components](https://spacy.io/usage/processing-pipelines#custom-components),
and add your own attributes, properties and methods to the `Doc`, `Token` and
`Span`. If you're looking to implement a new spaCy feature, starting with a
custom component package is usually the best strategy. You won't have to worry
Expand Down Expand Up @@ -170,7 +170,7 @@ If you've made changes to `.pyx` files, you need to recompile spaCy before you
can test your changes by re-running `python setup.py build_ext --inplace`.
Changes to `.py` files will be effective immediately.

📖 **For more details and instructions, see the documentation on [compiling spaCy from source](https://spacy.io/usage/#source) and the [quickstart widget](https://alpha.spacy.io/usage/#section-quickstart) to get the right commands for your platform and Python version.**
📖 **For more details and instructions, see the documentation on [compiling spaCy from source](https://spacy.io/usage/#source) and the [quickstart widget](https://spacy.io/usage/#section-quickstart) to get the right commands for your platform and Python version.**


### Contributor agreement
Expand Down Expand Up @@ -409,15 +409,15 @@ So if you're looking to edit the content of the tokenization section, you can
find it in `_spacy-101/_tokenization.jade`. To make it easy to add content
components, we use a [collection of custom mixins](_includes/_mixins.jade),
like `+table`, `+list` or `+code`. For an overview of the available mixins and
components, see the [styleguide](https://alpha.spacy.io/styleguide).
components, see the [styleguide](https://spacy.io/styleguide).

📖 **For more info and troubleshooting guides, check out the [website README](website).**

### Resources to get you started

* [Guide to static websites with Harp and Jade](https://ines.io/blog/the-ultimate-guide-static-websites-harp-jade) (ines.io)
* [Building a website with modular markup components (mixins)](https://explosion.ai/blog/modular-markup) (explosion.ai)
* [spacy.io Styleguide](https://alpha.spacy.io/styleguide) (spacy.io)
* [spacy.io Styleguide](https://spacy.io/styleguide) (spacy.io)
* [Jade/Pug documentation](https://pugjs.org) (pugjs.org)
* [Harp documentation](https://harpjs.com/) (harpjs.com)

Expand All @@ -432,7 +432,7 @@ and plugins in spaCy v2.0, and we can't wait to see what you build with it!
and install as a Python package – for example via [PyPi](http://pypi.python.org).

* Extensions that write to `Doc`, `Token` or `Span` attributes should be wrapped
as [pipeline components](https://alpha.spacy.io/usage/processing-pipelines#custom-components)
as [pipeline components](https://spacy.io/usage/processing-pipelines#custom-components)
that users can **add to their processing pipeline** using `nlp.add_pipe()`.

* When publishing your extension on GitHub, **tag it** with the topics
Expand All @@ -444,10 +444,10 @@ spaCy website. If you're sharing your project on Twitter, feel free to tag

* Once your extension is published, you can open an issue on the
[issue tracker](https://github.com/explosion/spacy/issues) to suggest it for the
[resources directory](https://alpha.spacy.io/usage/resources#extensions) on the
[resources directory](https://spacy.io/usage/resources#extensions) on the
website.

📖 **For more tips and best practices, see the [checklist for developing spaCy extensions](https://alpha.spacy.io/usage/processing-pipelines#extensions).**
📖 **For more tips and best practices, see the [checklist for developing spaCy extensions](https://spacy.io/usage/processing-pipelines#extensions).**

## Code of conduct

Expand Down
34 changes: 17 additions & 17 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ spaCy: Industrial-strength NLP
spaCy is a library for advanced Natural Language Processing in Python and Cython.
It's built on the very latest research, and was designed from day one to be
used in real products. spaCy comes with
`pre-trained statistical models <https://alpha.spacy.io/models>`_ and word
`pre-trained statistical models <https://spacy.io/models>`_ and word
vectors, and currently supports tokenization for **20+ languages**. It features
the **fastest syntactic parser** in the world, convolutional **neural network models**
for tagging, parsing and **named entity recognition** and easy **deep learning**
integration. It's commercial open-source software, released under the MIT license.

💫 **Version 2.0 out now!** `Check out the new features here. <https://alpha.spacy.io/usage/v2>`_
💫 **Version 2.0 out now!** `Check out the new features here. <https://spacy.io/usage/v2>`_

.. image:: https://img.shields.io/travis/explosion/spaCy/master.svg?style=flat-square
:target: https://travis-ci.org/explosion/spaCy
Expand Down Expand Up @@ -50,13 +50,13 @@ integration. It's commercial open-source software, released under the MIT licens
`Contribute`_ How to contribute to the spaCy project and code base.
=================== ===

.. _spaCy 101: https://alpha.spacy.io/usage/spacy-101
.. _New in v2.0: https://alpha.spacy.io/usage/v2#migrating
.. _Usage Guides: https://alpha.spacy.io/usage/
.. _API Reference: https://alpha.spacy.io/api/
.. _Models: https://alpha.spacy.io/models
.. _Resources: https://alpha.spacy.io/usage/resources
.. _Changelog: https://alpha.spacy.io/usage/#changelog
.. _spaCy 101: https://spacy.io/usage/spacy-101
.. _New in v2.0: https://spacy.io/usage/v2#migrating
.. _Usage Guides: https://spacy.io/usage/
.. _API Reference: https://spacy.io/api/
.. _Models: https://spacy.io/models
.. _Resources: https://spacy.io/usage/resources
.. _Changelog: https://spacy.io/usage/#changelog
.. _Contribute: https://github.com/explosion/spaCy/blob/master/CONTRIBUTING.md

💬 Where to ask questions
Expand Down Expand Up @@ -85,7 +85,7 @@ Features
* **Named entity** recognition
* Non-destructive **tokenization**
* Support for **20+ languages**
* Pre-trained `statistical models <https://alpha.spacy.io/models>`_ and word vectors
* Pre-trained `statistical models <https://spacy.io/models>`_ and word vectors
* Easy **deep learning** integration
* Part-of-speech tagging
* Labelled dependency parsing
Expand All @@ -98,13 +98,13 @@ Features
* State-of-the-art speed
* Robust, rigorously evaluated accuracy

📖 **For more details, see the** `facts, figures and benchmarks <https://alpha.spacy.io/usage/facts-figures>`_.
📖 **For more details, see the** `facts, figures and benchmarks <https://spacy.io/usage/facts-figures>`_.

Install spaCy
=============

For detailed installation instructions, see
the `documentation <https://alpha.spacy.io/usage>`_.
the `documentation <https://spacy.io/usage>`_.

==================== ===
**Operating system** macOS / OS X, Linux, Windows (Cygwin, MinGW, Visual Studio)
Expand Down Expand Up @@ -166,7 +166,7 @@ inputs must match. After updating spaCy, we recommend **retraining your models**
with the new version.

📖 **For details on upgrading from spaCy 1.x to spaCy 2.x, see the**
`migration guide <https://alpha.spacy.io/usage/v2#migrating>`_.
`migration guide <https://spacy.io/usage/v2#migrating>`_.

Download models
===============
Expand All @@ -181,8 +181,8 @@ or manually by pointing pip to a path or URL.
`Models Documentation`_ Detailed usage instructions.
======================= ===

.. _Available Models: https://alpha.spacy.io/models
.. _Models Documentation: https://alpha.spacy.io/docs/usage/models
.. _Available Models: https://spacy.io/models
.. _Models Documentation: https://spacy.io/docs/usage/models

.. code:: bash
Expand Down Expand Up @@ -218,7 +218,7 @@ then call its ``load()`` method:
doc = nlp(u'This is a sentence.')
📖 **For more info and examples, check out the**
`models documentation <https://alpha.spacy.io/docs/usage/models>`_.
`models documentation <https://spacy.io/docs/usage/models>`_.

Support for older versions
--------------------------
Expand Down Expand Up @@ -261,7 +261,7 @@ Compared to regular install via pip, `requirements.txt <requirements.txt>`_
additionally installs developer dependencies such as Cython. For more details
and instructions, see the documentation on
`compiling spaCy from source <https://spacy.io/usage/#source>`_ and the
`quickstart widget <https://alpha.spacy.io/usage/#section-quickstart>`_ to get
`quickstart widget <https://spacy.io/usage/#section-quickstart>`_ to get
the right commands for your platform and Python version.

Instead of the above verbose commands, you can also use the following
Expand Down
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# spaCy examples

The examples are Python scripts with well-behaved command line interfaces. For
more detailed usage guides, see the [documentation](https://alpha.spacy.io/usage/).
more detailed usage guides, see the [documentation](https://spacy.io/usage/).

To see the available arguments, you can use the `--help` or `-h` flag:

Expand Down
2 changes: 1 addition & 1 deletion examples/pipeline/custom_attr_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
they're "bound" to the object and are partially applied – i.e. the object
they're called on is passed in as the first argument.
* Custom pipeline components: https://alpha.spacy.io//usage/processing-pipelines#custom-components
* Custom pipeline components: https://spacy.io//usage/processing-pipelines#custom-components
Compatible with: spaCy v2.0.0+
"""
Expand Down
2 changes: 1 addition & 1 deletion examples/pipeline/custom_component_countries_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
coordinates. Can be extended with more details from the API.
* REST Countries API: https://restcountries.eu (Mozilla Public License MPL 2.0)
* Custom pipeline components: https://alpha.spacy.io//usage/processing-pipelines#custom-components
* Custom pipeline components: https://spacy.io//usage/processing-pipelines#custom-components
Compatible with: spaCy v2.0.0+
"""
Expand Down
2 changes: 1 addition & 1 deletion examples/pipeline/custom_component_entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
._.has_tech_org and ._.is_tech_org is set on the Doc/Span and Token
respectively.
* Custom pipeline components: https://alpha.spacy.io//usage/processing-pipelines#custom-components
* Custom pipeline components: https://spacy.io//usage/processing-pipelines#custom-components
Compatible with: spaCy v2.0.0+
"""
Expand Down
4 changes: 2 additions & 2 deletions examples/training/train_ner.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
existing model or a blank model.
For more details, see the documentation:
* Training: https://alpha.spacy.io/usage/training
* NER: https://alpha.spacy.io/usage/linguistic-features#named-entities
* Training: https://spacy.io/usage/training
* NER: https://spacy.io/usage/linguistic-features#named-entities
Compatible with: spaCy v2.0.0+
"""
Expand Down
4 changes: 2 additions & 2 deletions examples/training/train_new_entity_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
wrapping models as Python packages, for ease of deployment.
For more details, see the documentation:
* Training: https://alpha.spacy.io/usage/training
* NER: https://alpha.spacy.io/usage/linguistic-features#named-entities
* Training: https://spacy.io/usage/training
* NER: https://spacy.io/usage/linguistic-features#named-entities
Compatible with: spaCy v2.0.0+
"""
Expand Down
4 changes: 2 additions & 2 deletions examples/training/train_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# coding: utf8
"""Example of training spaCy dependency parser, starting off with an existing
model or a blank model. For more details, see the documentation:
* Training: https://alpha.spacy.io/usage/training
* Dependency Parse: https://alpha.spacy.io/usage/linguistic-features#dependency-parse
* Training: https://spacy.io/usage/training
* Dependency Parse: https://spacy.io/usage/linguistic-features#dependency-parse
Compatible with: spaCy v2.0.0+
"""
Expand Down
4 changes: 2 additions & 2 deletions examples/training/train_tagger.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
To allow us to update the tag map with our custom one, this example starts off
with a blank Language class and modifies its defaults. For more details, see
the documentation:
* Training: https://alpha.spacy.io/usage/training
* POS Tagging: https://alpha.spacy.io/usage/linguistic-features#pos-tagging
* Training: https://spacy.io/usage/training
* POS Tagging: https://spacy.io/usage/linguistic-features#pos-tagging
Compatible with: spaCy v2.0.0+
"""
Expand Down
4 changes: 2 additions & 2 deletions examples/training/train_textcat.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
automatically via Thinc's built-in dataset loader. The model is added to
spacy.pipeline, and predictions are available via `doc.cats`. For more details,
see the documentation:
* Training: https://alpha.spacy.io/usage/training
* Text classification: https://alpha.spacy.io/usage/text-classification
* Training: https://spacy.io/usage/training
* Text classification: https://spacy.io/usage/text-classification
Compatible with: spaCy v2.0.0+
"""
Expand Down
4 changes: 2 additions & 2 deletions spacy/about.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
__license__ = 'MIT'
__release__ = True

__docs_models__ = 'https://alpha.spacy.io/usage/models'
__docs_models__ = 'https://spacy.io/usage/models'
__download_url__ = 'https://github.com/explosion/spacy-models/releases/download'
__compatibility__ = 'https://raw.githubusercontent.com/explosion/spacy-models/master/compatibility.json'
__shortcuts__ = 'https://raw.githubusercontent.com/explosion/spacy-models/master/shortcuts-nightly.json'
__shortcuts__ = 'https://raw.githubusercontent.com/explosion/spacy-models/master/shortcuts-v2.json'
__model_files__ = 'https://raw.githubusercontent.com/explosion/spacy-dev-resources/develop/templates/model/'
7 changes: 3 additions & 4 deletions website/_harp.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

"SITENAME": "spaCy",
"SLOGAN": "Industrial-strength Natural Language Processing in Python",
"SITE_URL": "https://alpha.spacy.io",
"SITE_URL": "https://spacy.io",
"EMAIL": "contact@explosion.ai",

"COMPANY": "Explosion AI",
Expand Down Expand Up @@ -82,9 +82,8 @@
}
],

"ALPHA": true,
"V_CSS": "2.0a3",
"V_JS": "2.0a0",
"V_CSS": "2.0.0",
"V_JS": "2.0.0",
"DEFAULT_SYNTAX": "python",
"ANALYTICS": "UA-58931649-1",
"MAILCHIMP": {
Expand Down
2 changes: 1 addition & 1 deletion website/api/_top-level/_spacy.jade
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ p
nlp.add_pipe(component) # add component to pipeline
nlp.from_disk(model_data_path) # load in model data

+infobox("Deprecation note", "⚠️")
+infobox("Changed in v2.0", "⚠️")
| As of spaCy 2.0, the #[code path] keyword argument is deprecated. spaCy
| will also raise an error if no model could be loaded and never just
| return an empty #[code Language] object. If you need a blank language,
Expand Down
6 changes: 3 additions & 3 deletions website/api/language.jade
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ p
+cell #[code Doc]
+cell A container for accessing the annotations.

+infobox("Deprecation note", "⚠️")
+infobox("Changed in v2.0", "⚠️")
| Pipeline components to prevent from being loaded can now be added as
| a list to #[code disable], instead of specifying one keyword argument
| per component.
Expand Down Expand Up @@ -539,7 +539,7 @@ p
+cell #[code Language]
+cell The modified #[code Language] object.

+infobox("Deprecation note", "⚠️")
+infobox("Changed in v2.0", "⚠️")
| As of spaCy v2.0, the #[code save_to_directory] method has been
| renamed to #[code to_disk], to improve consistency across classes.
| Pipeline components to prevent from being loaded can now be added as
Expand Down Expand Up @@ -601,7 +601,7 @@ p Load state from a binary string.
+cell #[code Language]
+cell The #[code Language] object.

+infobox("Deprecation note", "⚠️")
+infobox("Changed in v2.0", "⚠️")
| Pipeline components to prevent from being loaded can now be added as
| a list to #[code disable], instead of specifying one keyword argument
| per component.
Expand Down
4 changes: 2 additions & 2 deletions website/api/matcher.jade
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
include ../_includes/_mixins

+infobox("Deprecation note", "⚠️")
+infobox("Changed in v2.0", "⚠️")
| As of spaCy 2.0, #[code Matcher.add_pattern] and #[code Matcher.add_entity]
| are deprecated and have been replaced with a simpler
| #[+api("matcher#add") #[code Matcher.add]] that lets you add a list of
Expand Down Expand Up @@ -202,7 +202,7 @@ p
| Match pattern. A pattern consists of a list of dicts, where each
| dict describes a token.

+infobox("Deprecation note", "⚠️")
+infobox("Changed in v2.0", "⚠️")
| As of spaCy 2.0, #[code Matcher.add_pattern] and #[code Matcher.add_entity]
| are deprecated and have been replaced with a simpler
| #[+api("matcher#add") #[code Matcher.add]] that lets you add a list of
Expand Down
2 changes: 1 addition & 1 deletion website/api/token.jade
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ p
+cell bool
+cell Whether the token starts a sentence.

+infobox("Deprecation note", "⚠️")
+infobox("Changed in v2.0", "⚠️")
| As of spaCy v2.0, the #[code Token.sent_start] property is deprecated and
| has been replaced with #[code Token.is_sent_start], which returns a
| boolean value instead of a misleading #[code 0] for #[code False] and
Expand Down
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"dependencies": {},
"scripts": {
"check_links": "blc https://alpha.spacy.io -ro",
"check_links": "blc https://spacy.io -ro",

"compile": "NODE_ENV=deploy harp compile",
"rollup_js": "rollup www/assets/js/rollup.js --output.format iife --output.file www/assets/js/rollup.js",
Expand Down
Loading

0 comments on commit a09c096

Please sign in to comment.