mirror of
https://github.com/explosion/spaCy.git
synced 2024-09-21 19:39:13 +03:00
Merge branch 'develop' of https://github.com/explosion/spaCy into develop
This commit is contained in:
commit
7c94df116e
|
@ -65,7 +65,7 @@ console_scripts =
|
||||||
|
|
||||||
[options.extras_require]
|
[options.extras_require]
|
||||||
lookups =
|
lookups =
|
||||||
spacy_lookups_data==1.0.0rc0
|
spacy_lookups_data>=1.0.0rc0,<1.0.0
|
||||||
transformers =
|
transformers =
|
||||||
spacy_transformers>=1.0.0a17,<1.0.0
|
spacy_transformers>=1.0.0a17,<1.0.0
|
||||||
cuda =
|
cuda =
|
||||||
|
|
|
@ -168,9 +168,13 @@ follow the same unified [`Model`](https://thinc.ai/docs/api-model) API and each
|
||||||
`Model` can also be used as a sublayer of a larger network, allowing you to
|
`Model` can also be used as a sublayer of a larger network, allowing you to
|
||||||
freely combine implementations from different frameworks into a single model.
|
freely combine implementations from different frameworks into a single model.
|
||||||
|
|
||||||
|
![Illustration of Pipe methods](../images/trainable_component.svg)
|
||||||
|
|
||||||
<Infobox title="Details & Documentation" emoji="📖" list>
|
<Infobox title="Details & Documentation" emoji="📖" list>
|
||||||
|
|
||||||
- **Usage: ** [Layers and architectures](/usage/layers-architectures)
|
- **Usage: ** [Layers and architectures](/usage/layers-architectures),
|
||||||
|
[Trainable component API](/usage/processing-pipelines#trainable-components),
|
||||||
|
[Trainable components and models](/usage/layers-architectures#components)
|
||||||
- **Thinc: **
|
- **Thinc: **
|
||||||
[Wrapping PyTorch, TensorFlow & MXNet](https://thinc.ai/docs/usage-frameworks),
|
[Wrapping PyTorch, TensorFlow & MXNet](https://thinc.ai/docs/usage-frameworks),
|
||||||
[`Model` API](https://thinc.ai/docs/api-model)
|
[`Model` API](https://thinc.ai/docs/api-model)
|
||||||
|
@ -503,36 +507,27 @@ Note that spaCy v3.0 now requires **Python 3.6+**.
|
||||||
- Pipeline package symlinks, the `link` command and shortcut names are now
|
- Pipeline package symlinks, the `link` command and shortcut names are now
|
||||||
deprecated. There can be many [different trained pipelines](/models) and not
|
deprecated. There can be many [different trained pipelines](/models) and not
|
||||||
just one "English model", so you should always use the full package name like
|
just one "English model", so you should always use the full package name like
|
||||||
[`en_core_web_sm`](/models/en) explicitly.
|
`en_core_web_sm` explicitly.
|
||||||
- A pipeline's [`meta.json`](/api/data-formats#meta) is now only used to provide
|
- A pipeline's `meta.json` is now only used to provide meta information like the
|
||||||
meta information like the package name, author, license and labels. It's
|
package name, author, license and labels. It's **not** used to construct the
|
||||||
**not** used to construct the processing pipeline anymore. This is all defined
|
processing pipeline anymore. This is all defined in the
|
||||||
in the [`config.cfg`](/api/data-formats#config), which also includes all
|
[`config.cfg`](/api/data-formats#config), which also includes all settings
|
||||||
settings used to train the pipeline.
|
used to train the pipeline.
|
||||||
- The [`train`](/api/cli#train) and [`pretrain`](/api/cli#pretrain) commands now
|
- The `train`, `pretrain` and `debug data` commands now only take a
|
||||||
only take a `config.cfg` file containing the full
|
`config.cfg`.
|
||||||
[training config](/usage/training#config).
|
|
||||||
- [`Language.add_pipe`](/api/language#add_pipe) now takes the **string name** of
|
- [`Language.add_pipe`](/api/language#add_pipe) now takes the **string name** of
|
||||||
the component factory instead of the component function.
|
the component factory instead of the component function.
|
||||||
- **Custom pipeline components** now need to be decorated with the
|
- **Custom pipeline components** now need to be decorated with the
|
||||||
[`@Language.component`](/api/language#component) or
|
[`@Language.component`](/api/language#component) or
|
||||||
[`@Language.factory`](/api/language#factory) decorator.
|
[`@Language.factory`](/api/language#factory) decorator.
|
||||||
- [`Language.update`](/api/language#update) now takes a batch of
|
|
||||||
[`Example`](/api/example) objects instead of raw texts and annotations, or
|
|
||||||
`Doc` and `GoldParse` objects.
|
|
||||||
- The `Language.disable_pipes` context manager has been replaced by
|
|
||||||
[`Language.select_pipes`](/api/language#select_pipes), which can explicitly
|
|
||||||
disable or enable components.
|
|
||||||
- The [`Language.update`](/api/language#update),
|
- The [`Language.update`](/api/language#update),
|
||||||
[`Language.evaluate`](/api/language#evaluate) and
|
[`Language.evaluate`](/api/language#evaluate) and
|
||||||
[`Pipe.update`](/api/pipe#update) methods now all take batches of
|
[`Pipe.update`](/api/pipe#update) methods now all take batches of
|
||||||
[`Example`](/api/example) objects instead of `Doc` and `GoldParse` objects, or
|
[`Example`](/api/example) objects instead of `Doc` and `GoldParse` objects, or
|
||||||
raw text and a dictionary of annotations.
|
raw text and a dictionary of annotations.
|
||||||
[`Language.initialize`](/api/language#initialize) and
|
- The `begin_training` methods have been renamed to `initialize` and now take a
|
||||||
[`Pipe.initialize`](/api/pipe#initialize) now take a function that returns a
|
function that returns a sequence of `Example` objects to initialize the model
|
||||||
sequence of `Example` objects to initialize the model instead of a list of
|
instead of a list of tuples.
|
||||||
tuples.
|
|
||||||
- The `begin_training` methods have been renamed to `initialize`.
|
|
||||||
- [`Matcher.add`](/api/matcher#add) and
|
- [`Matcher.add`](/api/matcher#add) and
|
||||||
[`PhraseMatcher.add`](/api/phrasematcher#add) now only accept a list of
|
[`PhraseMatcher.add`](/api/phrasematcher#add) now only accept a list of
|
||||||
patterns as the second argument (instead of a variable number of arguments).
|
patterns as the second argument (instead of a variable number of arguments).
|
||||||
|
@ -557,7 +552,7 @@ Note that spaCy v3.0 now requires **Python 3.6+**.
|
||||||
|
|
||||||
| Removed | Replacement |
|
| Removed | Replacement |
|
||||||
| -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
| -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||||
| `Language.disable_pipes` | [`Language.select_pipes`](/api/language#select_pipes), [`Language.disable_pipe`](/api/language#disable_pipe) |
|
| `Language.disable_pipes` | [`Language.select_pipes`](/api/language#select_pipes), [`Language.disable_pipe`](/api/language#disable_pipe), [`Language.enable_pipe`](/api/language#enable_pipe) |
|
||||||
| `Language.begin_training`, `Pipe.begin_training`, ... | [`Language.initialize`](/api/language#initialize), [`Pipe.initialize`](/api/pipe#initialize), ... |
|
| `Language.begin_training`, `Pipe.begin_training`, ... | [`Language.initialize`](/api/language#initialize), [`Pipe.initialize`](/api/pipe#initialize), ... |
|
||||||
| `Doc.is_tagged`, `Doc.is_parsed`, ... | [`Doc.has_annotation`](/api/doc#has_annotation) |
|
| `Doc.is_tagged`, `Doc.is_parsed`, ... | [`Doc.has_annotation`](/api/doc#has_annotation) |
|
||||||
| `GoldParse` | [`Example`](/api/example) |
|
| `GoldParse` | [`Example`](/api/example) |
|
||||||
|
|
Loading…
Reference in New Issue
Block a user