EntityLinkerFactory (Apache OpenNLP :: Core :: Runtime 3.0.0-M4 API)
Description: declaration: package: opennlp.tools.entitylinker, class: EntityLinkerFactory

Package opennlp.tools.entitylinker

# Class EntityLinkerFactory

java.lang.Object
opennlp.tools.entitylinker.EntityLinkerFactory

public class EntityLinkerFactory extends Object
Generates a `EntityLinker` instances via a `properties` file configuration.

In the properties file, the linker implementation must be provided using `"linker"` as the properties key, and the full class name as value.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `EntityLinkerFactory()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static opennlp.tools.entitylinker.EntityLinker<?>`
  `getLinker(String entityType, opennlp.tools.entitylinker.EntityLinkerProperties properties)`
  Retrieves a `EntityLinker` instance matching the `properties` configuration.
  `static opennlp.tools.entitylinker.EntityLinker<?>`
  `getLinker(opennlp.tools.entitylinker.EntityLinkerProperties properties)`
  Retrieves a `EntityLinker` instance matching the `properties` configuration.

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

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

- ## Constructor Details

  - ### EntityLinkerFactory

    public EntityLinkerFactory()

- ## Method Details

  - ### getLinker

    public static opennlp.tools.entitylinker.EntityLinker<?> getLinker(String entityType, opennlp.tools.entitylinker.EntityLinkerProperties properties) throws IOException
    Retrieves a `EntityLinker` instance matching the `properties` configuration.
    Parameters:
      `entityType` - The type of entity being linked to. This value is used to retrieve the implementation of the `EntityLinker` from the `EntityLinker` properties file. Must not be `null`.
      `properties` - An object that extends `EntityLinkerProperties`. This object will be passed into the `EntityLinker.init(EntityLinkerProperties)` method, so it is an appropriate place to put additional resources. Must not be `null`.
    Returns:
      The `EntityLinker` instance for the `properties` configuration.
    Throws:
      `IOException` - Thrown if IO errors occurred.
      `IllegalArgumentException` - Thrown if parameters were invalid.

  - ### getLinker

    public static opennlp.tools.entitylinker.EntityLinker<?> getLinker(opennlp.tools.entitylinker.EntityLinkerProperties properties) throws IOException
    Retrieves a `EntityLinker` instance matching the `properties` configuration.
    Parameters:
      `properties` - An object that extends `EntityLinkerProperties`. This object will be passed into the `EntityLinker.init(EntityLinkerProperties)` method, so it is an appropriate place to put additional resources. Must not be `null`.
    Returns:
      The `EntityLinker` instance for the `properties` configuration.
    Throws:
      `IOException` - Thrown if IO errors occurred.
      `IllegalArgumentException` - Thrown if parameters were invalid.