Download pretrained NLP models. For more information about the parameters see https://stanfordnlp.github.io/stanza/download_models.html.
stanza_download(
language = "en",
model_dir = stanza_options("model_dir"),
package = "default",
processors = list(),
logging_level = "INFO",
resources_url = stanza_options("resources_url"),
resources_version = stanza_options("resources_version"),
model_url = stanza_options("model_url")
)
NULL
a character string giving the language (default is "en"
).
path to the directory for storing the for Stanza
models
(default is "~/stanza_resources"
).
a character string giving the package to be used (default is "default"
.
In this context package refers to a language specific set of models packaged
together to a single ".zip"
file.
a character string or named list giving the processors to download models for.
If a string is provided it should provide the names of the desired processers as comma seperated
string, e.g., "tokenize,pos"
.
If a named list is provided, the name should be the processor name and the values the
package name, e.g., list(tokenize = "ewt", pos = "ewt")
.
a character string giving the logging level (default is "INFO"
),
available levels are c('DEBUG', 'INFO', 'WARNING', 'WARN', 'ERROR', 'CRITICAL', 'FATAL')
.
a character string giving the url to the Stanza
model resources.
The default value is obtained from Python during the initiatlization and can be obtained
and changed by using stanza_options
.
a character string giving the version of the resources.
The default value is obtained from Python during the initiatlization and can be obtained
and changed by using stanza_options
.
a character string giving the model url.
The default value is obtained from Python during the initiatlization and can be obtained
and changed by using stanza_options
.
if (stanza_options("testing_level") >= 3L) {
stanza_initialize()
stanza_download("en")
}
Run the code above in your browser using DataLab