nlp_language_detector_dl_pretrained: Load a pretrained Spark NLP LanguageDetectorDL model

View source: R/language-detector-dl.R

nlp_language_detector_dl_pretrainedR Documentation

Load a pretrained Spark NLP LanguageDetectorDL model

Description

Create a pretrained Spark NLP LanguageDetectorDL model

Usage

nlp_language_detector_dl_pretrained(
  sc,
  input_cols,
  output_col,
  alphabet = NULL,
  coalesce_sentences = NULL,
  language = NULL,
  threshold = NULL,
  threshold_label = NULL,
  name = NULL,
  lang = NULL,
  remote_loc = NULL
)

Arguments

sc

A Spark connection

input_cols

Input columns. String array.

output_col

Output column. String.

alphabet

alphabet used to feed the TensorFlow model for prediction (Map of string to integer) This should be an R environment

coalesce_sentences

If sets to true the output of all sentences will be averaged to one output instead of one output per sentence. (boolean)

language

used to map prediction to two-letter (ISO 639-1) language codes (Map of string to integer) This should be an R environment

threshold

The minimum threshold for the final result otheriwse it will be either Unknown or the value set in thresholdLabel.

threshold_label

In case the score of prediction is less than threshold, what should be the label.

name

the name of the model to load. If NULL will use the default value

lang

the language of the model to be loaded. If NULL will use the default value

remote_loc

the remote location of the model. If NULL will use the default value

Value

The Spark NLP model with the pretrained model loaded


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