sparknlp.functions

Contains helper functions to assist in transforming Annotation results.

Functions

explode_annotations_col(dataframe, column, ...)

Explodes an Annotation column, putting each result onto a separate row.

filter_by_annotations_col(dataframe, f, column)

Applies a filter over a column of Annotations.

map_annotations(f, output_type)

Creates a Spark UDF to map over an Annotator's results.

map_annotations_array(f, output_type)

Creates a Spark UDF to map over an Annotator's array results.

map_annotations_col(dataframe, f, column, ...)

Creates a Spark UDF to map over a column of Annotation results.

map_annotations_cols(dataframe, f, columns, ...)

Creates a Spark UDF to map over multiple columns of Annotation results.

map_annotations_strict(f)

Creates a Spark UDF to map over an Annotator's results, for which the return type is explicitly defined as a Annotation.dataType().