sparknlp.common.match_strategy#

Allowed strategies for RuleFactory applications regarding replacement

Module Contents#

Classes#

MatchStrategy

Object that contains constants for how for matched strategies used in RuleFactory.

class MatchStrategy[source]#

Object that contains constants for how for matched strategies used in RuleFactory.

Possible values are:

Value

Description

MatchStrategy.MATCH_ALL

This strategy matches all occurrences of all rules in the given text.

MatchStrategy.MATCH_FIRST

This strategy matches only the first occurrence of each rule in the given text.

MatchStrategy.MATCH_COMPLETE

This strategy matches only the first occurrence of each rule in the given text.