nlp_pretrained_pipeline: Spark NLP Pretrained pipeline

View source: R/pretrained-pipeline.R

nlp_pretrained_pipelineR Documentation

Spark NLP Pretrained pipeline

Description

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

Usage

nlp_pretrained_pipeline(
  x,
  download_name,
  lang = "en",
  source = "public/models",
  parse_embeddings_vectors = FALSE,
  disk_location = NULL
)

Arguments

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

Value

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.


r-spark/sparknlp documentation built on Oct. 15, 2022, 10:50 a.m.