RegexNameFinderFactory (Apache OpenNLP Tools 1.9.5 API)
Date: 2026-06-18

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 and Description
    --- | ---
    `static class` | `RegexNameFinderFactory.DEFAULT_REGEX_NAME_FINDER`
    `static interface` | `RegexNameFinderFactory.RegexAble`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RegexNameFinderFactory()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and 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)` Returns a RegexNamefinder that will utilize specified default regexes.

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### RegexNameFinderFactory

          public RegexNameFinderFactory()

  - ### 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 win
        `defaults` - 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`

Copyright © 2026 The Apache Software Foundation. All rights reserved.