Download spaCy language models
Arguments
- lang_models
character; language models to be installed. Defaults
en_core_web_sm(English model). A vector of multiple model names can be used (e.g.c("en_core_web_sm", "de_core_news_sm")). A list of available language models and their names is available from the spaCy language models page.- force
ignore if spaCy/the lang_models is already present and install it anyway.
Details
Models are downloaded from GitHub. If a download fails, for instance because of a temporary server error, it is tried twice more, after 10 and 30 seconds, and a warning is given if all three attempts fail.
Examples
if (FALSE) { # \dontrun{
# install medium sized model
spacy_download_langmodel("en_core_web_md")
#' # install several models with spaCy
spacy_install(lang_models = c("en_core_web_sm", "de_core_news_sm"))
# install transformer based model
spacy_download_langmodel("en_core_web_trf")
} # }