View source: R/pretrained-pipeline.R
nlp_pretrained_pipeline | R Documentation |
Creates a Spark NLP pretrained pipeline. See https://nlp.johnsnowlabs.com/api/index.html#com.johnsnowlabs.nlp.pretrained.PretrainedPipeline for the default values for the parameters if left null
nlp_pretrained_pipeline( x, download_name, lang = "en", source = "public/models", parse_embeddings_vectors = FALSE, disk_location = NULL )
x |
a Spark connection, Spark dataframe or string or character vector |
download_name |
the name of the pretrained pipeline to download and create |
lang |
the language of the pipeline |
source |
the source for the pipeline file |
parse_embeddings_vectors |
whether to parse the embeddings vectors or not |
disk_location |
optional location on disk that the pipeline should be loaded from |
The object returned depends on the class of x
.
spark_connection
: When x
is a spark_connection
, the function returns an instance of
a ml_pipeline
created from the pretrained pipeline.
tbl_spark
: When x
is a tbl_spark
, a the pretrained pipeline is created and immediately
run on the provied dataframe using ml_fit_and_transform
returning the transformed data frame.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.