mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-13 02:36:32 +03:00
Merge branch 'master' of https://github.com/explosion/spaCy
This commit is contained in:
commit
7de0dcb91f
13
README.rst
13
README.rst
|
@ -5,7 +5,7 @@ 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
|
It's built on the very latest research, and was designed from day one to be
|
||||||
used in real products. spaCy comes with
|
used in real products. spaCy comes with
|
||||||
`pre-trained statistical models <https://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
|
vectors, and currently supports tokenization for **30+ languages**. It features
|
||||||
the **fastest syntactic parser** in the world, convolutional **neural network models**
|
the **fastest syntactic parser** in the world, convolutional **neural network models**
|
||||||
for tagging, parsing and **named entity recognition** and easy **deep learning**
|
for tagging, parsing and **named entity recognition** and easy **deep learning**
|
||||||
integration. It's commercial open-source software, released under the MIT license.
|
integration. It's commercial open-source software, released under the MIT license.
|
||||||
|
@ -32,9 +32,9 @@ integration. It's commercial open-source software, released under the MIT licens
|
||||||
:target: https://anaconda.org/conda-forge/spacy
|
:target: https://anaconda.org/conda-forge/spacy
|
||||||
:alt: conda Version
|
:alt: conda Version
|
||||||
|
|
||||||
.. image:: https://img.shields.io/badge/chat-join%20%E2%86%92-09a3d5.svg?style=flat-square&logo=gitter-white
|
.. image:: https://img.shields.io/badge/wheels-%E2%9C%93-4c1.svg?longCache=true&style=flat-square&logo=python&logoColor=white
|
||||||
:target: https://gitter.im/explosion/spaCy
|
:target: https://github.com/explosion/wheelwright/releases
|
||||||
:alt: spaCy on Gitter
|
:alt: Python wheels
|
||||||
|
|
||||||
.. image:: https://img.shields.io/twitter/follow/spacy_io.svg?style=social&label=Follow
|
.. image:: https://img.shields.io/twitter/follow/spacy_io.svg?style=social&label=Follow
|
||||||
:target: https://twitter.com/spacy_io
|
:target: https://twitter.com/spacy_io
|
||||||
|
@ -113,7 +113,7 @@ the `documentation <https://spacy.io/usage>`_.
|
||||||
==================== ===
|
==================== ===
|
||||||
**Operating system** macOS / OS X, Linux, Windows (Cygwin, MinGW, Visual Studio)
|
**Operating system** macOS / OS X, Linux, Windows (Cygwin, MinGW, Visual Studio)
|
||||||
**Python version** CPython 2.7, 3.4+. Only 64 bit.
|
**Python version** CPython 2.7, 3.4+. Only 64 bit.
|
||||||
**Package managers** `pip`_ (source packages only), `conda`_ (via ``conda-forge``)
|
**Package managers** `pip`_, `conda`_ (via ``conda-forge``)
|
||||||
==================== ===
|
==================== ===
|
||||||
|
|
||||||
.. _pip: https://pypi.python.org/pypi/spacy
|
.. _pip: https://pypi.python.org/pypi/spacy
|
||||||
|
@ -122,7 +122,8 @@ the `documentation <https://spacy.io/usage>`_.
|
||||||
pip
|
pip
|
||||||
---
|
---
|
||||||
|
|
||||||
Using pip, spaCy releases are currently only available as source packages.
|
Using pip, spaCy releases are available as source packages and binary wheels
|
||||||
|
(as of ``v2.0.13``).
|
||||||
|
|
||||||
.. code:: bash
|
.. code:: bash
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ Example sentences to test spaCy and its language models.
|
||||||
|
|
||||||
|
|
||||||
sentences = [
|
sentences = [
|
||||||
|
"මෙය වාක්යයකි.",
|
||||||
"ඔබ කවුද?",
|
"ඔබ කවුද?",
|
||||||
"ගූගල් සමාගම ඩොලර් මිලියන 500 කට එම ආයතනය මිලදී ගන්නා ලදී.",
|
"ගූගල් සමාගම ඩොලර් මිලියන 500 කට එම ආයතනය මිලදී ගන්නා ලදී.",
|
||||||
"කොළඹ ශ්රී ලංකාවේ ප්රධානතම නගරය යි.",
|
"කොළඹ ශ්රී ලංකාවේ ප්රධානතම නගරය යි.",
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
"MODELS_REPO": "explosion/spacy-models",
|
"MODELS_REPO": "explosion/spacy-models",
|
||||||
|
|
||||||
"SPACY_VERSION": "2.0",
|
"SPACY_VERSION": "2.0",
|
||||||
"BINDER_VERSION": "2.0.12",
|
"BINDER_VERSION": "2.0.13",
|
||||||
|
|
||||||
"SOCIAL": {
|
"SOCIAL": {
|
||||||
"twitter": "spacy_io",
|
"twitter": "spacy_io",
|
||||||
|
|
|
@ -346,6 +346,7 @@ p
|
||||||
|
|
||||||
+row
|
+row
|
||||||
+cell #[code --verbose]
|
+cell #[code --verbose]
|
||||||
|
+tag-new("2.0.13")
|
||||||
+cell flag
|
+cell flag
|
||||||
+cell Show more detail message during training.
|
+cell Show more detail message during training.
|
||||||
|
|
||||||
|
|
|
@ -581,7 +581,7 @@ p
|
||||||
| web applications.
|
| web applications.
|
||||||
|
|
||||||
+aside-code("Example").
|
+aside-code("Example").
|
||||||
doc = nlp('Alice ate the pizza.')
|
doc = nlp(u'Alice ate the pizza.')
|
||||||
trees = doc.print_tree()
|
trees = doc.print_tree()
|
||||||
# {'modifiers': [
|
# {'modifiers': [
|
||||||
# {'modifiers': [], 'NE': 'PERSON', 'word': 'Alice', 'arc': 'nsubj', 'POS_coarse': 'PROPN', 'POS_fine': 'NNP', 'lemma': 'Alice'},
|
# {'modifiers': [], 'NE': 'PERSON', 'word': 'Alice', 'arc': 'nsubj', 'POS_coarse': 'PROPN', 'POS_fine': 'NNP', 'lemma': 'Alice'},
|
||||||
|
@ -615,8 +615,8 @@ p
|
||||||
| document.
|
| document.
|
||||||
|
|
||||||
+aside-code("Example").
|
+aside-code("Example").
|
||||||
tokens = nlp(u'Mr. Best flew to New York on Saturday morning.')
|
doc = nlp(u'Mr. Best flew to New York on Saturday morning.')
|
||||||
ents = list(tokens.ents)
|
ents = list(doc.ents)
|
||||||
assert ents[0].label == 346
|
assert ents[0].label == 346
|
||||||
assert ents[0].label_ == 'PERSON'
|
assert ents[0].label_ == 'PERSON'
|
||||||
assert ents[0].text == 'Mr. Best'
|
assert ents[0].text == 'Mr. Best'
|
||||||
|
|
|
@ -349,6 +349,30 @@ p Retokenize the document, such that the span is merged into a single token.
|
||||||
+cell #[code Token]
|
+cell #[code Token]
|
||||||
+cell The newly merged token.
|
+cell The newly merged token.
|
||||||
|
|
||||||
|
+h(2, "ents") Span.ents
|
||||||
|
+tag property
|
||||||
|
+tag-model("NER")
|
||||||
|
|
||||||
|
p
|
||||||
|
| Iterate over the entities in the span. Yields named-entity
|
||||||
|
| #[code Span] objects, if the entity recognizer has been applied to the
|
||||||
|
| parent document.
|
||||||
|
|
||||||
|
+aside-code("Example").
|
||||||
|
doc = nlp(u'Mr. Best flew to New York on Saturday morning.')
|
||||||
|
span = doc[0:6]
|
||||||
|
ents = list(span.ents)
|
||||||
|
assert ents[0].label == 346
|
||||||
|
assert ents[0].label_ == 'PERSON'
|
||||||
|
assert ents[0].text == 'Mr. Best'
|
||||||
|
|
||||||
|
+table(["Name", "Type", "Description"])
|
||||||
|
+row("foot")
|
||||||
|
+cell yields
|
||||||
|
+cell #[code Span]
|
||||||
|
+cell Entities in the document.
|
||||||
|
|
||||||
|
|
||||||
+h(2, "as_doc") Span.as_doc
|
+h(2, "as_doc") Span.as_doc
|
||||||
|
|
||||||
p
|
p
|
||||||
|
|
|
@ -27,17 +27,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"comparison": {
|
|
||||||
"title": "Model Comparison",
|
|
||||||
"teaser": "Compare spaCy's statistical models and their accuracy.",
|
|
||||||
"tag": "experimental",
|
|
||||||
"compare_models": true,
|
|
||||||
"default_models": {
|
|
||||||
"model1": "en_core_web_sm",
|
|
||||||
"model2": "en_core_web_lg"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"MODELS": {
|
"MODELS": {
|
||||||
"en": ["en_core_web_sm", "en_core_web_md", "en_core_web_lg", "en_vectors_web_lg"],
|
"en": ["en_core_web_sm", "en_core_web_md", "en_core_web_lg", "en_vectors_web_lg"],
|
||||||
"de": ["de_core_news_sm"],
|
"de": ["de_core_news_sm"],
|
||||||
|
@ -122,6 +111,8 @@
|
||||||
"fa": "Persian",
|
"fa": "Persian",
|
||||||
"ur": "Urdu",
|
"ur": "Urdu",
|
||||||
"tt": "Tatar",
|
"tt": "Tatar",
|
||||||
|
"te": "Telugu",
|
||||||
|
"si": "Sinhala",
|
||||||
"ga": "Irish",
|
"ga": "Irish",
|
||||||
"bn": "Bengali",
|
"bn": "Bengali",
|
||||||
"hi": "Hindi",
|
"hi": "Hindi",
|
||||||
|
|
|
@ -3,7 +3,9 @@
|
||||||
+h(3, "pip") pip
|
+h(3, "pip") pip
|
||||||
+badge("https://img.shields.io/pypi/v/spacy.svg?style=flat-square", "https://pypi.python.org/pypi/spacy")
|
+badge("https://img.shields.io/pypi/v/spacy.svg?style=flat-square", "https://pypi.python.org/pypi/spacy")
|
||||||
|
|
||||||
p Using pip, spaCy releases are currently only available as source packages.
|
p
|
||||||
|
| Using pip, spaCy releases are available as source packages and binary
|
||||||
|
| wheels (as of #[code v2.0.13]).
|
||||||
|
|
||||||
+code(false, "bash").
|
+code(false, "bash").
|
||||||
pip install -U spacy
|
pip install -U spacy
|
||||||
|
|
Loading…
Reference in New Issue
Block a user