SpaCy: Difference between revisions

From Alliance Doc
Jump to navigation Jump to search
No edit summary
(Marked this version for translation)
Line 3: Line 3:
<translate>
<translate>


<!--T:25-->
[https://spacy.io/ spaCy] is a Python package that provides industrial-strength natural language processing.
[https://spacy.io/ spaCy] is a Python package that provides industrial-strength natural language processing.


= Installation =  
= Installation = <!--T:26-->
==Latest available wheels==
==Latest available wheels==
To see the latest version of <tt>spaCy</tt> that we have built:
To see the latest version of <tt>spaCy</tt> that we have built:
Line 11: Line 12:
For more information on listing wheels, see [[Python#Listing_available_wheels | listing available wheels]].
For more information on listing wheels, see [[Python#Listing_available_wheels | listing available wheels]].


==Pre-build==
==Pre-build== <!--T:27-->


<!--T:28-->
The preferred option is to install it using the python [https://pythonwheels.com/ wheel] that we compile, as follows:  
The preferred option is to install it using the python [https://pythonwheels.com/ wheel] that we compile, as follows:  
:1. Load a python module, either <tt>python/2.7</tt>, <tt>python/3.5</tt>, or <tt>python/3.6</tt>
:1. Load a python module, either <tt>python/2.7</tt>, <tt>python/3.5</tt>, or <tt>python/3.6</tt>
Line 21: Line 23:
:{{Command|prompt=(venv) [name@server ~]|pip install spacy --no-index}}
:{{Command|prompt=(venv) [name@server ~]|pip install spacy --no-index}}


<!--T:29-->
'''Note''': if you want to use <tt>thinc</tt> [https://docs.computecanada.ca/wiki/PyTorch Pytorch] wrapper, you'll also need to install <tt>torch_cpu</tt> or  <tt>torch_gpu</tt> wheel.
'''Note''': if you want to use <tt>thinc</tt> [https://docs.computecanada.ca/wiki/PyTorch Pytorch] wrapper, you'll also need to install <tt>torch_cpu</tt> or  <tt>torch_gpu</tt> wheel.
</translate>
</translate>

Revision as of 23:43, 12 November 2018

Other languages:

spaCy is a Python package that provides industrial-strength natural language processing.

Installation

Latest available wheels

To see the latest version of spaCy that we have built:

Question.png
[name@server ~]$ avail_wheels spacy thinc thinc_gpu_ops

For more information on listing wheels, see listing available wheels.

Pre-build

The preferred option is to install it using the python wheel that we compile, as follows:

1. Load a python module, either python/2.7, python/3.5, or python/3.6
2. Create and start a virtual environment.
3. Install spaCy in the virtual environment with pip install. For both GPU and CPU support:
Question.png
(venv) [name@server ~] pip install spacy[cuda] --no-index
If you only need CPU support:
Question.png
(venv) [name@server ~] pip install spacy --no-index

Note: if you want to use thinc Pytorch wrapper, you'll also need to install torch_cpu or torch_gpu wheel.