Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

spacy_initialize

Initialize spaCy


Description

Initialize spaCy to call from R.

Usage

spacy_initialize(
  model = "en_core_web_sm",
  python_executable = NULL,
  virtualenv = NULL,
  condaenv = NULL,
  ask = FALSE,
  refresh_settings = FALSE,
  save_profile = FALSE,
  check_env = TRUE,
  entity = TRUE
)

Arguments

model

Language package for loading spaCy. Example: en_core_web_sm (English) and de_core_web_sm (German). Default is en_core_web_sm.

python_executable

the full path to the Python executable, for which spaCy is installed

virtualenv

set a path to the Python virtual environment with spaCy installed Example: virtualenv = "~/myenv"

condaenv

set a path to the anaconda virtual environment with spaCy installed Example: condalenv = "myenv"

ask

logical; if FALSE, use the first spaCy installation found; if TRUE, list available spaCy installations and prompt the user for which to use. If another (e.g. python_executable) is set, then this value will always be treated as FALSE.

refresh_settings

logical; if TRUE, spacyr will ignore the saved settings in the profile and initiate a search of new settings.

save_profile

logical; if TRUE, the current spaCy setting will be saved for the future use.

check_env

logical; check whether conda/virtual environment generated by spacyr_istall() exists

entity

logical; if FALSE is selected, named entity recognition is turned off in spaCy. This will speed up the parsing as it will exclude ner from the pipeline. For details of spaCy pipeline, see https://spacy.io/usage/processing-pipelines. The option FALSE is available only for spaCy version 2.0.0 or higher.

Author(s)

Akitaka Matsuo


spacyr

Wrapper to the 'spaCy' 'NLP' Library

v1.2.1
GPL-3
Authors
Kenneth Benoit [cre, aut, cph] (<https://orcid.org/0000-0002-0797-564X>), Akitaka Matsuo [aut] (<https://orcid.org/0000-0002-3323-6330>), European Research Council [fnd] (ERC-2011-StG 283794-QUANTESS)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.