nlp_re_ner_chunks_filter: Spark NLP RENerChunksFilter

View source: R/re_ner_chunks_filter.R

nlp_re_ner_chunks_filterR Documentation

Spark NLP RENerChunksFilter

Description

Spark ML transformer that filters and outputs combinations of relations between extracted entities, for further processing. This annotator is especially useful to create inputs for the RelationExtractionDLModel.

Usage

nlp_re_ner_chunks_filter(
  x,
  input_cols,
  output_col,
  max_syntactic_distance = NULL,
  relation_pairs,
  uid = random_string("re_ner_chunks_filter_")
)

Arguments

x

A spark_connection, ml_pipeline, or a tbl_spark.

input_cols

Input columns. String array.

output_col

Output column. String.

max_syntactic_distance

Maximal syntactic distance, as threshold (Default: 0)

relation_pairs

List of dash-separated pairs of named entities ("ENTITY1-ENTITY2", e.g. "Biomarker-RelativeDay"), which will be processed

uid

A character string used to uniquely identify the ML estimator.

Details

See https://nlp.johnsnowlabs.com/docs/en/licensed_annotators#renerchunksfilter

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_estimator object. The object contains a pointer to a Spark Estimator object and can be used to compose Pipeline objects.

  • ml_pipeline: When x is a ml_pipeline, the function returns a ml_pipeline with the NLP estimator appended to the pipeline.

  • tbl_spark: When x is a tbl_spark, an estimator is constructed then immediately fit with the input tbl_spark, returning an NLP model.


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