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
Modifier and TypeClassDescriptionstatic enum
Enumeration of typical regex expressions available in OpenNLP.static interface
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.static RegexNameFinder
Retrieves aRegexNameFinder
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
- AMap
where 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_FINDER
enum values.- Returns:
- A
RegexNameFinder
instance.
-
getDefaultRegexNameFinders
public static RegexNameFinder getDefaultRegexNameFinders(RegexNameFinderFactory.DEFAULT_REGEX_NAME_FINDER... defaults) Retrieves aRegexNameFinder
that will utilize specified default regexes.- Parameters:
defaults
- One or more of the defaultRegexNameFinderFactory.DEFAULT_REGEX_NAME_FINDER
enum values.- Returns:
- A
RegexNameFinder
instance.
-