Package opennlp.tools.namefind
Class RegexNameFinderFactory
- java.lang.Object
-
- opennlp.tools.namefind.RegexNameFinderFactory
-
public class RegexNameFinderFactory extends Object
Returns a RegexNameFinder 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
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 configurationstatic RegexNameFinder
getDefaultRegexNameFinders(RegexNameFinderFactory.DEFAULT_REGEX_NAME_FINDER... defaults)
Returns a RegexNamefinder 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
- 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
-
-