Package opennlp.tools.entitylinker
Class EntityLinkerProperties
- java.lang.Object
-
- opennlp.tools.entitylinker.EntityLinkerProperties
-
public class EntityLinkerProperties extends Object
Properties wrapper for the EntityLinker framework
-
-
Constructor Summary
Constructors Constructor Description EntityLinkerProperties(File propertiesfile)
Constructor takes location of properties file as argEntityLinkerProperties(InputStream propertiesIn)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getProperty(String key, String defaultValue)
Gets a property from the props file.
-
-
-
Constructor Detail
-
EntityLinkerProperties
public EntityLinkerProperties(File propertiesfile) throws IOException
Constructor takes location of properties file as arg- Parameters:
propertiesfile
- the properties file- Throws:
IOException
-
EntityLinkerProperties
public EntityLinkerProperties(InputStream propertiesIn) throws IOException
- Parameters:
propertiesIn
- inputstream of properties file. Stream will not be closed- Throws:
IOException
-
-
Method Detail
-
getProperty
public String getProperty(String key, String defaultValue) throws IOException
Gets a property from the props file.- Parameters:
key
- the key to the desired item in the properties file (key=value)defaultValue
- a default value in case the key, or the value are missing- Returns:
- a property value in the form of a string
- Throws:
IOException
- when the properties object was somehow not initialized properly
-
-