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 enumEnumeration of typical regex expressions available in OpenNLP.static 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 configuration.static RegexNameFinderRetrieves aRegexNameFinderthat 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- AMapwhere the key is a type, and the value is aPattern. If a key clashes with one of the default keys, the config map entry will be taken.defaults- One or more of the defaultRegexNameFinderFactory.DEFAULT_REGEX_NAME_FINDERenum values.- Returns:
- A
RegexNameFinderinstance.
-
getDefaultRegexNameFinders
public static RegexNameFinder getDefaultRegexNameFinders(RegexNameFinderFactory.DEFAULT_REGEX_NAME_FINDER... defaults) Retrieves aRegexNameFinderthat will utilize specified default regexes.- Parameters:
defaults- One or more of the defaultRegexNameFinderFactory.DEFAULT_REGEX_NAME_FINDERenum values.- Returns:
- A
RegexNameFinderinstance.
-