Package opennlp.tools.namefind
Class RegexNameFinderFactory
java.lang.Object
opennlp.tools.namefind.RegexNameFinderFactory
Returns a RegexNameFinder based on A selection of
defaults or a configuration and a selection of defaults
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic interface -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RegexNameFindergetDefaultRegexNameFinders(Map<String, Pattern[]> config, RegexNameFinderFactory.DEFAULT_REGEX_NAME_FINDER... defaults) Allows for use of selected Defaults as well as regexes from external configurationstatic RegexNameFinderReturns a RegexNamefinder that will utilize specified default regexes.
-
Constructor Details
-
RegexNameFinderFactory
public RegexNameFinderFactory()
-
-
Method Details
-
getDefaultRegexNameFinders
public static RegexNameFinder getDefaultRegexNameFinders(Map<String, Pattern[]> config, RegexNameFinderFactory.DEFAULT_REGEX_NAME_FINDER... defaults) Allows for use of selected Defaults as well as regexes from external configuration- Parameters:
config- a map where the key is a type, and the value is a Pattern[]. If the keys clash with default keys, the config map will windefaults- the OpenNLP default regexes- Returns:
RegexNameFinder
-
getDefaultRegexNameFinders
public static RegexNameFinder getDefaultRegexNameFinders(RegexNameFinderFactory.DEFAULT_REGEX_NAME_FINDER... defaults) Returns a RegexNamefinder that will utilize specified default regexes.- Parameters:
defaults- the OpenNLP default regexes- Returns:
RegexNameFinder
-