Package opennlp.tools.entitylinker
Klasse EntityLinkerFactory
java.lang.Object
opennlp.tools.entitylinker.EntityLinkerFactory
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.
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic EntityLinker<?> getLinker(String entityType, EntityLinkerProperties properties) Retrieves aEntityLinkerinstance matching thepropertiesconfiguration.static EntityLinker<?> getLinker(EntityLinkerProperties properties) Retrieves aEntityLinkerinstance matching thepropertiesconfiguration.
-
Konstruktordetails
-
EntityLinkerFactory
public EntityLinkerFactory()
-
-
Methodendetails
-
getLinker
public static EntityLinker<?> getLinker(String entityType, EntityLinkerProperties properties) throws IOException Retrieves aEntityLinkerinstance matching thepropertiesconfiguration.- Parameter:
entityType- The type of entity being linked to. This value is used to retrieve the implementation of theEntityLinkerfrom theEntityLinkerproperties file. Must not benull.properties- An object that extendsEntityLinkerProperties. This object will be passed into theEntityLinker.init(EntityLinkerProperties)method, so it is an appropriate place to put additional resources. Must not benull.- Gibt zurück:
- The
EntityLinkerinstance for thepropertiesconfiguration. - Löst aus:
IOException- Thrown if IO errors occurred.IllegalArgumentException- Thrown if parameters were invalid.
-
getLinker
Retrieves aEntityLinkerinstance matching thepropertiesconfiguration.- Parameter:
properties- An object that extendsEntityLinkerProperties. This object will be passed into theEntityLinker.init(EntityLinkerProperties)method, so it is an appropriate place to put additional resources. Must not benull.- Gibt zurück:
- The
EntityLinkerinstance for thepropertiesconfiguration. - Löst aus:
IOException- Thrown if IO errors occurred.IllegalArgumentException- Thrown if parameters were invalid.
-