Package opennlp.tools.namefind

## Class TokenNameFinderFactory

- java.lang.Object
- - opennlp.tools.util.BaseToolFactory
  - - opennlp.tools.namefind.TokenNameFinderFactory

-     public class TokenNameFinderFactory
      extends BaseToolFactory

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `TokenNameFinderFactory()` | Creates a `TokenNameFinderFactory` that provides the default implementation of the resources.
    `TokenNameFinderFactory​(byte[] featureGeneratorBytes, Map<String,​Object> resources, SequenceCodec<String> seqCodec)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static TokenNameFinderFactory` | `create​(String subclassName, byte[] featureGeneratorBytes, Map<String,​Object> resources, SequenceCodec<String> seqCodec)` |
    `NameContextGenerator` | `createContextGenerator()` |
    `AdaptiveFeatureGenerator` | `createFeatureGenerators()` | Creates the `AdaptiveFeatureGenerator`.
    `SequenceCodec<String>` | `createSequenceCodec()` |
    `static SequenceCodec<String>` | `instantiateSequenceCodec​(String sequenceCodecImplName)` |
    `void` | `validateArtifactMap()` | Validates the parsed artifacts.

    - ### Methods inherited from class opennlp.tools.util.BaseToolFactory

      `create, create, createArtifactMap, createArtifactSerializersMap, createManifestEntries`

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

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

- - ### Constructor Detail

    - #### TokenNameFinderFactory

          public TokenNameFinderFactory()

      Creates a `TokenNameFinderFactory` that provides the default implementation of the resources.

    - #### TokenNameFinderFactory

          public TokenNameFinderFactory​(byte[] featureGeneratorBytes,
                                        Map<String,​Object> resources,
                                        SequenceCodec<String> seqCodec)

  - ### Method Detail

    - #### create

          public static TokenNameFinderFactory create​(String subclassName,
                                                      byte[] featureGeneratorBytes,
                                                      Map<String,​Object> resources,
                                                      SequenceCodec<String> seqCodec)
                                               throws InvalidFormatException

      Throws:
        `InvalidFormatException`

    - #### validateArtifactMap

          public void validateArtifactMap()
                                   throws InvalidFormatException

      Description copied from class: `BaseToolFactory`
      Validates the parsed artifacts. If something is not valid subclasses should throw an `InvalidFormatException`. Note: Subclasses should generally invoke super.validateArtifactMap at the beginning of this method.
      Specified by:
        `validateArtifactMap` in class `BaseToolFactory`
      Throws:
        `InvalidFormatException`

    - #### createSequenceCodec

          public SequenceCodec<String> createSequenceCodec()

    - #### createContextGenerator

          public NameContextGenerator createContextGenerator()

    - #### createFeatureGenerators

          public AdaptiveFeatureGenerator createFeatureGenerators()

      Creates the `AdaptiveFeatureGenerator`. Usually this is a set of generators contained in the `AggregatedFeatureGenerator`. Note: The generators are created on every call to this method.
      Returns:
        the feature generator or null if there is no descriptor in the model

    - #### instantiateSequenceCodec

          public static SequenceCodec<String> instantiateSequenceCodec​(String sequenceCodecImplName)