sparknlp_jsl.annotator.filtering_params#

Module Contents#

Classes#

FilteringParams

It is a base class that contains filtering functions.

class FilteringParams#

Bases: sparknlp_jsl.annotator.white_black_list_params.WhiteBlackListParams

It is a base class that contains filtering functions.

blackList#
caseSensitive#
criteria#
filterValue#
regex#
whiteList#
setBlackList(value)#

Sets If defined, list of entities to ignore. The rest will be processed. Do not include IOB prefix on labels

Parameters:

value (List[str]) – If defined, list of entities to ignore. The rest will be processed. Do not include IOB prefix on labels

setCaseSensitive(value)#

Determines whether the definitions of the white listed and black listed entities are case sensitive or not.

Parameters:

value (bool) – Whether white listed and black listed entities are case sensitive or not. Default: True.

setCriteria(value)#

It is used to compare black and white listed values with the result of the Annotation.

Possible values are the following: ‘isin’, ‘regex’. Default: ‘isin’.

isin : Filter by the chunk regex : Filter by using a regex

Parameters:

value (string) – It is used to compare black and white listed values with the result of the Annotation. Possible values are the following: ‘isin’, ‘regex’. Default: ‘isin’.

setDenyList(value)#

Sets If defined, list of entities to ignore. The rest will be processed. Do not include IOB prefix on labels

Parameters:

value (List[str]) – If defined, list of entities to ignore. The rest will be processed. Do not include IOB prefix on labels

setFilterValue(value)#

Sets possible values ‘result’ or ‘entity’.

If the value is ‘result’, It filters according to the result of the Annotation. If the value is ‘entity’, It filters according to the entity field in the metadata of the Annotation.

Parameters:

value (string) – possible values are ‘result’ and ‘entity’.

setRegex(value)#

Sets If defined, list of regex to process the chunks.

Parameters:

value (List[str]) – If defined, list of regex to process the chunks

setWhiteList(value)#

Sets If defined, list of entities to process. The rest will be ignored. Do not include IOB prefix on labels

Parameters:

value (List[str]) – If defined, list of entities to process. The rest will be ignored. Do not include IOB prefix on labels