Class EntityLinkerProperties
- Namespace
- NOpenNLP.Tools.Entitylinker
- Assembly
- NOpenNLP.Tools.dll
Properties wrapper for the EntityLinker framework.
public class EntityLinkerProperties
- Inheritance
-
EntityLinkerProperties
- Inherited Members
Constructors
EntityLinkerProperties(Stream)
Initializes a new instance from the given stream.
public EntityLinkerProperties(Stream propertiesIn)
Parameters
propertiesInStreamThe stream of the properties file. The stream will not be closed.
Exceptions
- IOException
Thrown if the stream cannot be read.
EntityLinkerProperties(string)
Initializes a new instance from the given properties file.
public EntityLinkerProperties(string propertiesFile)
Parameters
propertiesFilestringThe path of the properties file.
Exceptions
- IOException
Thrown if the file cannot be read.
Methods
GetProperty(string, string?)
Gets a property from the props file.
public string? GetProperty(string key, string? defaultValue)
Parameters
keystringThe key to the desired item in the properties file (key=value).
defaultValuestringA default value in case the key, or the value are missing.
Returns
- string
A property value in the form of a string.
Remarks
NOpenNLP: Java also declares an IOException for an uninitialized properties object. Both constructors here assign the field, so that state is unreachable and the check is omitted rather than left as dead code.