Package opennlp.tools.namefind
Class RegexNameFinderFactory
- java.lang.Object
-
- opennlp.tools.namefind.RegexNameFinderFactory
-
public class RegexNameFinderFactory extends Object
Returns aRegexNameFinder
based on a selection of defaults or a configuration and a selection of defaults.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RegexNameFinderFactory.DEFAULT_REGEX_NAME_FINDER
Enumeration of typical regex expressions available in OpenNLP.static interface
RegexNameFinderFactory.RegexAble
-
Constructor Summary
Constructors Constructor Description RegexNameFinderFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.static RegexNameFinder
getDefaultRegexNameFinders(RegexNameFinderFactory.DEFAULT_REGEX_NAME_FINDER... defaults)
Retrieves aRegexNameFinder
that will utilize specified default regexes.
-
-
-
Method Detail
-
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.
-
-