Description Usage Arguments spaCy Version Issues Examples
View source: R/spacy_install.R
Install spaCy in a self-contained environment, including
specified language models. For macOS and Linux-based systems, this will
also install Python itself via a "miniconda" environment, for
spacy_install
. Alternatively, an existing conda installation may be
used, by specifying its path. The default setting of "auto"
will
locate and use an existing installation automatically, or download and
install one if none exists.
For Windows, automatic installation of miniconda installation is not currently available, so the user will need to miniconda (or Anaconda) manually.
If you wish to install Python ion a "virtualenv", use the
spacy_install_virtualenv
function.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | spacy_install(
conda = "auto",
version = "latest",
lang_models = "en_core_web_sm",
python_version = "3.6",
envname = "spacy_condaenv",
pip = FALSE,
python_path = NULL,
prompt = TRUE
)
spacy_install_virtualenv(
version = "latest",
lang_models = "en_core_web_sm",
python_version = "3.6",
python_path = NULL,
prompt = TRUE
)
|
conda |
character; path to conda executable. Default "auto" which automatically find the path |
version |
character; spaCy version to install. Specify You can also provide a full major.minor.patch specification (e.g. "1.1.0") |
lang_models |
character; language models to be installed. Default
|
python_version |
character; determine Python version for condaenv installation. 3.5 and 3.6 are available. |
envname |
character; name of the conda-environment to install spaCy. Default is "spacy_condaenv". |
pip |
|
python_path |
character; path to Python in virtualenv installation |
prompt |
logical; ask whether to proceed during the installation |
The version options currently default to the latest spaCy v2 (version
= "latest"
). As of 2018-04, however,
some performance
issues affect the speed of the spaCy pipeline for spaCy v2.x relative to
v1.x. This can enormously affect the performance of
spacy_parse()
, especially when a large number of small texts are
parsed. For this reason, the spacyr provides an option to
automatically install the latest version of spaCy v1.*, using version
= "latest_v1"
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
# install spaCy in a miniconda environment (macOS and Linux)
spacy_install(lang_models = c("en_core_web_sm", "de_core_news_sm"), prompt = FALSE)
# install spaCy to an existing conda environment
spacy_install(conda = "~/anaconda/bin/")
## End(Not run)
## Not run:
# install spaCy in a virtualenv environment
spacy_install_virtualenv(lang_models = c("en_core_web_sm"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.