You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

384 lines
14 KiB

4 years ago
  1. Metadata-Version: 2.1
  2. Name: spacy
  3. Version: 2.0.18
  4. Summary: Industrial-strength Natural Language Processing (NLP) with Python and Cython
  5. Home-page: https://spacy.io
  6. Author: Explosion AI
  7. Author-email: contact@explosion.ai
  8. License: MIT
  9. Platform: UNKNOWN
  10. Classifier: Development Status :: 5 - Production/Stable
  11. Classifier: Environment :: Console
  12. Classifier: Intended Audience :: Developers
  13. Classifier: Intended Audience :: Science/Research
  14. Classifier: License :: OSI Approved :: MIT License
  15. Classifier: Operating System :: POSIX :: Linux
  16. Classifier: Operating System :: MacOS :: MacOS X
  17. Classifier: Operating System :: Microsoft :: Windows
  18. Classifier: Programming Language :: Cython
  19. Classifier: Programming Language :: Python :: 2
  20. Classifier: Programming Language :: Python :: 2.7
  21. Classifier: Programming Language :: Python :: 3
  22. Classifier: Programming Language :: Python :: 3.4
  23. Classifier: Programming Language :: Python :: 3.5
  24. Classifier: Programming Language :: Python :: 3.6
  25. Classifier: Topic :: Scientific/Engineering
  26. Requires-Dist: numpy (>=1.15.0)
  27. Requires-Dist: murmurhash (<1.1.0,>=0.28.0)
  28. Requires-Dist: cymem (<2.1.0,>=2.0.2)
  29. Requires-Dist: preshed (<2.1.0,>=2.0.1)
  30. Requires-Dist: thinc (<6.13.0,>=6.12.1)
  31. Requires-Dist: plac (<1.0.0,>=0.9.6)
  32. Requires-Dist: ujson (>=1.35)
  33. Requires-Dist: dill (<0.3,>=0.2)
  34. Requires-Dist: regex (==2018.01.10)
  35. Requires-Dist: requests (<3.0.0,>=2.13.0)
  36. Requires-Dist: pathlib (==1.0.1) ; python_version < "3.4"
  37. Provides-Extra: cuda
  38. Requires-Dist: cupy (>=4.0) ; extra == 'cuda'
  39. Provides-Extra: cuda100
  40. Requires-Dist: cupy-cuda100 (>=4.0) ; extra == 'cuda100'
  41. Requires-Dist: thinc-gpu-ops (<0.1.0,>=0.0.3) ; extra == 'cuda100'
  42. Provides-Extra: cuda80
  43. Requires-Dist: cupy-cuda80 (>=4.0) ; extra == 'cuda80'
  44. Requires-Dist: thinc-gpu-ops (<0.1.0,>=0.0.3) ; extra == 'cuda80'
  45. Provides-Extra: cuda90
  46. Requires-Dist: cupy-cuda90 (>=4.0) ; extra == 'cuda90'
  47. Requires-Dist: thinc-gpu-ops (<0.1.0,>=0.0.3) ; extra == 'cuda90'
  48. Provides-Extra: cuda91
  49. Requires-Dist: cupy-cuda91 (>=4.0) ; extra == 'cuda91'
  50. Requires-Dist: thinc-gpu-ops (<0.1.0,>=0.0.3) ; extra == 'cuda91'
  51. Provides-Extra: cuda92
  52. Requires-Dist: cupy-cuda92 (>=4.0) ; extra == 'cuda92'
  53. Requires-Dist: thinc-gpu-ops (<0.1.0,>=0.0.3) ; extra == 'cuda92'
  54. spaCy: Industrial-strength NLP
  55. ******************************
  56. spaCy is a library for advanced Natural Language Processing in Python and Cython.
  57. It's built on the very latest research, and was designed from day one to be
  58. used in real products. spaCy comes with
  59. `pre-trained statistical models <https://spacy.io/models>`_ and word
  60. vectors, and currently supports tokenization for **30+ languages**. It features
  61. the **fastest syntactic parser** in the world, convolutional **neural network models**
  62. for tagging, parsing and **named entity recognition** and easy **deep learning**
  63. integration. It's commercial open-source software, released under the MIT license.
  64. 💫 **Version 2.0 out now!** `Check out the release notes here. <https://github.com/explosion/spaCy/releases>`_
  65. .. image:: https://img.shields.io/travis/explosion/spaCy/master.svg?style=flat-square&logo=travis
  66. :target: https://travis-ci.org/explosion/spaCy
  67. :alt: Build Status
  68. .. image:: https://img.shields.io/appveyor/ci/explosion/spaCy/master.svg?style=flat-square&logo=appveyor
  69. :target: https://ci.appveyor.com/project/explosion/spaCy
  70. :alt: Appveyor Build Status
  71. .. image:: https://img.shields.io/github/release/explosion/spacy.svg?style=flat-square
  72. :target: https://github.com/explosion/spaCy/releases
  73. :alt: Current Release Version
  74. .. image:: https://img.shields.io/pypi/v/spacy.svg?style=flat-square
  75. :target: https://pypi.python.org/pypi/spacy
  76. :alt: pypi Version
  77. .. image:: https://img.shields.io/conda/vn/conda-forge/spacy.svg?style=flat-square
  78. :target: https://anaconda.org/conda-forge/spacy
  79. :alt: conda Version
  80. .. image:: https://img.shields.io/badge/wheels-%E2%9C%93-4c1.svg?longCache=true&style=flat-square&logo=python&logoColor=white
  81. :target: https://github.com/explosion/wheelwright/releases
  82. :alt: Python wheels
  83. .. image:: https://img.shields.io/twitter/follow/spacy_io.svg?style=social&label=Follow
  84. :target: https://twitter.com/spacy_io
  85. :alt: spaCy on Twitter
  86. 📖 Documentation
  87. ================
  88. =================== ===
  89. `spaCy 101`_ New to spaCy? Here's everything you need to know!
  90. `Usage Guides`_ How to use spaCy and its features.
  91. `New in v2.0`_ New features, backwards incompatibilities and migration guide.
  92. `API Reference`_ The detailed reference for spaCy's API.
  93. `Models`_ Download statistical language models for spaCy.
  94. `Universe`_ Libraries, extensions, demos, books and courses.
  95. `Changelog`_ Changes and version history.
  96. `Contribute`_ How to contribute to the spaCy project and code base.
  97. =================== ===
  98. .. _spaCy 101: https://spacy.io/usage/spacy-101
  99. .. _New in v2.0: https://spacy.io/usage/v2#migrating
  100. .. _Usage Guides: https://spacy.io/usage/
  101. .. _API Reference: https://spacy.io/api/
  102. .. _Models: https://spacy.io/models
  103. .. _Universe: https://spacy.io/universe
  104. .. _Changelog: https://spacy.io/usage/#changelog
  105. .. _Contribute: https://github.com/explosion/spaCy/blob/master/CONTRIBUTING.md
  106. 💬 Where to ask questions
  107. ==========================
  108. The spaCy project is maintained by `@honnibal <https://github.com/honnibal>`_
  109. and `@ines <https://github.com/ines>`_. Please understand that we won't be able
  110. to provide individual support via email. We also believe that help is much more
  111. valuable if it's shared publicly, so that more people can benefit from it.
  112. ====================== ===
  113. **Bug Reports** `GitHub Issue Tracker`_
  114. **Usage Questions** `Stack Overflow`_, `Gitter Chat`_, `Reddit User Group`_
  115. **General Discussion** `Gitter Chat`_, `Reddit User Group`_
  116. ====================== ===
  117. .. _GitHub Issue Tracker: https://github.com/explosion/spaCy/issues
  118. .. _Stack Overflow: http://stackoverflow.com/questions/tagged/spacy
  119. .. _Gitter Chat: https://gitter.im/explosion/spaCy
  120. .. _Reddit User Group: https://www.reddit.com/r/spacynlp
  121. Features
  122. ========
  123. * **Fastest syntactic parser** in the world
  124. * **Named entity** recognition
  125. * Non-destructive **tokenization**
  126. * Support for **30+ languages**
  127. * Pre-trained `statistical models <https://spacy.io/models>`_ and word vectors
  128. * Easy **deep learning** integration
  129. * Part-of-speech tagging
  130. * Labelled dependency parsing
  131. * Syntax-driven sentence segmentation
  132. * Built in **visualizers** for syntax and NER
  133. * Convenient string-to-hash mapping
  134. * Export to numpy data arrays
  135. * Efficient binary serialization
  136. * Easy **model packaging** and deployment
  137. * State-of-the-art speed
  138. * Robust, rigorously evaluated accuracy
  139. 📖 **For more details, see the** `facts, figures and benchmarks <https://spacy.io/usage/facts-figures>`_.
  140. Install spaCy
  141. =============
  142. For detailed installation instructions, see
  143. the `documentation <https://spacy.io/usage>`_.
  144. ==================== ===
  145. **Operating system** macOS / OS X, Linux, Windows (Cygwin, MinGW, Visual Studio)
  146. **Python version** CPython 2.7, 3.4+. Only 64 bit.
  147. **Package managers** `pip`_, `conda`_ (via ``conda-forge``)
  148. ==================== ===
  149. .. _pip: https://pypi.python.org/pypi/spacy
  150. .. _conda: https://anaconda.org/conda-forge/spacy
  151. pip
  152. ---
  153. Using pip, spaCy releases are available as source packages and binary wheels
  154. (as of ``v2.0.13``).
  155. .. code:: bash
  156. pip install spacy
  157. When using pip it is generally recommended to install packages in a virtual
  158. environment to avoid modifying system state:
  159. .. code:: bash
  160. python -m venv .env
  161. source .env/bin/activate
  162. pip install spacy
  163. conda
  164. -----
  165. Thanks to our great community, we've finally re-added conda support. You can now
  166. install spaCy via ``conda-forge``:
  167. .. code:: bash
  168.   conda config --add channels conda-forge
  169.   conda install spacy
  170. For the feedstock including the build recipe and configuration,
  171. check out `this repository <https://github.com/conda-forge/spacy-feedstock>`_.
  172. Improvements and pull requests to the recipe and setup are always appreciated.
  173. Updating spaCy
  174. --------------
  175. Some updates to spaCy may require downloading new statistical models. If you're
  176. running spaCy v2.0 or higher, you can use the ``validate`` command to check if
  177. your installed models are compatible and if not, print details on how to update
  178. them:
  179. .. code:: bash
  180. pip install -U spacy
  181. python -m spacy validate
  182. If you've trained your own models, keep in mind that your training and runtime
  183. inputs must match. After updating spaCy, we recommend **retraining your models**
  184. with the new version.
  185. 📖 **For details on upgrading from spaCy 1.x to spaCy 2.x, see the**
  186. `migration guide <https://spacy.io/usage/v2#migrating>`_.
  187. Download models
  188. ===============
  189. As of v1.7.0, models for spaCy can be installed as **Python packages**.
  190. This means that they're a component of your application, just like any
  191. other module. Models can be installed using spaCy's ``download`` command,
  192. or manually by pointing pip to a path or URL.
  193. ======================= ===
  194. `Available Models`_ Detailed model descriptions, accuracy figures and benchmarks.
  195. `Models Documentation`_ Detailed usage instructions.
  196. ======================= ===
  197. .. _Available Models: https://spacy.io/models
  198. .. _Models Documentation: https://spacy.io/docs/usage/models
  199. .. code:: bash
  200. # out-of-the-box: download best-matching default model
  201. python -m spacy download en
  202. # download best-matching version of specific model for your spaCy installation
  203. python -m spacy download en_core_web_lg
  204. # pip install .tar.gz archive from path or URL
  205. pip install /Users/you/en_core_web_sm-2.0.0.tar.gz
  206. Loading and using models
  207. ------------------------
  208. To load a model, use ``spacy.load()`` with the model's shortcut link:
  209. .. code:: python
  210. import spacy
  211. nlp = spacy.load('en')
  212. doc = nlp(u'This is a sentence.')
  213. If you've installed a model via pip, you can also ``import`` it directly and
  214. then call its ``load()`` method:
  215. .. code:: python
  216. import spacy
  217. import en_core_web_sm
  218. nlp = en_core_web_sm.load()
  219. doc = nlp(u'This is a sentence.')
  220. 📖 **For more info and examples, check out the**
  221. `models documentation <https://spacy.io/docs/usage/models>`_.
  222. Support for older versions
  223. --------------------------
  224. If you're using an older version (``v1.6.0`` or below), you can still download
  225. and install the old models from within spaCy using ``python -m spacy.en.download all``
  226. or ``python -m spacy.de.download all``. The ``.tar.gz`` archives are also
  227. `attached to the v1.6.0 release <https://github.com/explosion/spaCy/tree/v1.6.0>`_.
  228. To download and install the models manually, unpack the archive, drop the
  229. contained directory into ``spacy/data`` and load the model via ``spacy.load('en')``
  230. or ``spacy.load('de')``.
  231. Compile from source
  232. ===================
  233. The other way to install spaCy is to clone its
  234. `GitHub repository <https://github.com/explosion/spaCy>`_ and build it from
  235. source. That is the common way if you want to make changes to the code base.
  236. You'll need to make sure that you have a development environment consisting of a
  237. Python distribution including header files, a compiler,
  238. `pip <https://pip.pypa.io/en/latest/installing/>`__, `virtualenv <https://virtualenv.pypa.io/>`_
  239. and `git <https://git-scm.com>`_ installed. The compiler part is the trickiest.
  240. How to do that depends on your system. See notes on Ubuntu, OS X and Windows for
  241. details.
  242. .. code:: bash
  243. # make sure you are using the latest pip
  244. python -m pip install -U pip
  245. git clone https://github.com/explosion/spaCy
  246. cd spaCy
  247. python -m venv .env
  248. source .env/bin/activate
  249. export PYTHONPATH=`pwd`
  250. pip install -r requirements.txt
  251. python setup.py build_ext --inplace
  252. Compared to regular install via pip, `requirements.txt <requirements.txt>`_
  253. additionally installs developer dependencies such as Cython. For more details
  254. and instructions, see the documentation on
  255. `compiling spaCy from source <https://spacy.io/usage/#source>`_ and the
  256. `quickstart widget <https://spacy.io/usage/#section-quickstart>`_ to get
  257. the right commands for your platform and Python version.
  258. Instead of the above verbose commands, you can also use the following
  259. `Fabric <http://www.fabfile.org/>`_ commands. All commands assume that your
  260. virtual environment is located in a directory ``.env``. If you're using a
  261. different directory, you can change it via the environment variable ``VENV_DIR``,
  262. for example ``VENV_DIR=".custom-env" fab clean make``.
  263. ============= ===
  264. ``fab env`` Create virtual environment and delete previous one, if it exists.
  265. ``fab make`` Compile the source.
  266. ``fab clean`` Remove compiled objects, including the generated C++.
  267. ``fab test`` Run basic tests, aborting after first failure.
  268. ============= ===
  269. Ubuntu
  270. ------
  271. Install system-level dependencies via ``apt-get``:
  272. .. code:: bash
  273. sudo apt-get install build-essential python-dev git
  274. macOS / OS X
  275. ------------
  276. Install a recent version of `XCode <https://developer.apple.com/xcode/>`_,
  277. including the so-called "Command Line Tools". macOS and OS X ship with Python
  278. and git preinstalled.
  279. Windows
  280. -------
  281. Install a version of `Visual Studio Express <https://www.visualstudio.com/vs/visual-studio-express/>`_
  282. or higher that matches the version that was used to compile your Python
  283. interpreter. For official distributions these are VS 2008 (Python 2.7),
  284. VS 2010 (Python 3.4) and VS 2015 (Python 3.5).
  285. Run tests
  286. =========
  287. spaCy comes with an `extensive test suite <spacy/tests>`_. In order to run the
  288. tests, you'll usually want to clone the repository and build spaCy from source.
  289. This will also install the required development dependencies and test utilities
  290. defined in the ``requirements.txt``.
  291. Alternatively, you can find out where spaCy is installed and run ``pytest`` on
  292. that directory. Don't forget to also install the test utilities via spaCy's
  293. ``requirements.txt``:
  294. .. code:: bash
  295. python -c "import os; import spacy; print(os.path.dirname(spacy.__file__))"
  296. pip install -r path/to/requirements.txt
  297. python -m pytest <spacy-directory>
  298. See `the documentation <https://spacy.io/usage/#tests>`_ for more details and
  299. examples.