stanza_pipeline {stanza}R Documentation

NLP Pipeline

Description

NLP Pipeline

Usage

stanza_pipeline(
  language = "en",
  model_dir = stanza_options("model_dir"),
  package = "default",
  processors = list(),
  logging_level = "INFO",
  use_gpu = FALSE,
  download_method = "reuse_resources",
  ...
)

Arguments

language

a character string giving the language (default is "en").

model_dir

path to the directory for storing the for Stanza models (default is "~/stanza_resources").

package

(default is "default".

processors

FIXME: we should define if we want to use comma seperated string or a character vector.

logging_level

a character string giving the logging level (default is "INFO"), available levels are c('DEBUG', 'INFO', 'WARNING', 'WARN', 'ERROR', 'CRITICAL', 'FATAL').

use_gpu

a logical giving if GPU or CPU should be used (default is FALSE).

download_method

an integer or character string giving the download method code. If a character string is provided, it is passed to stanza_download_method_code to obtain the integer code. Use stanza_download_method_code to obtain the code and list all available download methods.

...

additional named arguments passed to the stanza pipeline.

Value

a function that can be used to process text.

Examples

## Not run: 
p <- stanza_pipeline()
doc <- p('R is a programming language for statistical computing.')

## End(Not run)


[Package stanza version 1.0-3 Index]