nlp_word_embeddings_model: Create a Spark NLP WordEmbeddingsModel

View source: R/word-embeddings.R

nlp_word_embeddings_modelR Documentation

Create a Spark NLP WordEmbeddingsModel

Description

This function creates a WordEmbeddingsModel which uses the provided embeddings_ref.

Usage

nlp_word_embeddings_model(
  sc,
  input_cols,
  output_col,
  storage_ref = NULL,
  dimension,
  case_sensitive = NULL,
  include_storage = NULL,
  lazy_annotator = NULL,
  read_cache_size = NULL,
  include_embeddings = NULL,
  uid = random_string("word_embeddings_")
)

Arguments

sc

Spark connection

input_cols

Input columns. String array.

output_col

Output column. String.

storage_ref

binding to NerDLModel trained by that embeddings

dimension

number of word embeddings dimensions

case_sensitive

whether to ignore case in tokens for embeddings matching

include_storage

include the storage

lazy_annotator

boolean for laziness

read_cache_size

size for the read cache

include_embeddings

whether or not to include word embeddings when saving this annotator to disk (single or within pipeline)

uid

unique identifier for this instance

Value

a Spark transformer WordEmbeddingsModel


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