RegexNameFinderFactory (Apache OpenNLP Tools 2.5.9 API)
Description: declaration: package: opennlp.tools.namefind, class: RegexNameFinderFactory

# 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 enum`
  `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

  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 a `RegexNameFinder` that will utilize specified default regexes.

  ### Methods inherited from class Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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 a key clashes with one of the default keys, the config map entry will be taken.
      `defaults` - One or more of the default `RegexNameFinderFactory.DEFAULT_REGEX_NAME_FINDER` enum values.
    Returns:
      A `RegexNameFinder` instance.

  - ### getDefaultRegexNameFinders

    public static RegexNameFinder getDefaultRegexNameFinders(RegexNameFinderFactory.DEFAULT_REGEX_NAME_FINDER... defaults)
    Retrieves a `RegexNameFinder` that will utilize specified default regexes.
    Parameters:
      `defaults` - One or more of the default `RegexNameFinderFactory.DEFAULT_REGEX_NAME_FINDER` enum values.
    Returns:
      A `RegexNameFinder` instance.