Class NameSample
Class for holding names for a single unit of text.
public class NameSample
- Inheritance
-
NameSample
- Inherited Members
Constructors
NameSample(string?, string[], Span[]?, string[][]?, bool)
public NameSample(string? id, string[] sentence, Span[]? names, string[][]? additionalContext, bool clearAdaptiveData)
Parameters
NameSample(string[], Span[]?, bool)
public NameSample(string[] sentence, Span[]? names, bool clearAdaptiveData)
Parameters
NameSample(string[], Span[]?, string[][]?, bool)
Initializes the current instance.
public NameSample(string[] sentence, Span[]? names, string[][]? additionalContext, bool clearAdaptiveData)
Parameters
sentencestring[]training sentence
namesSpan[]the names contained in the sentence
additionalContextstring[][]the additional context or
nullclearAdaptiveDataboolif true the adaptive data of the feature generators is cleared
Fields
DEFAULT_TYPE
The default type value when there is no type in training data.
public const string DEFAULT_TYPE = "default"
Field Value
Properties
AdditionalContext
public virtual string[][]? AdditionalContext { get; }
Property Value
- string[][]
Id
public virtual string? Id { get; }
Property Value
IsClearAdaptiveDataSet
public virtual bool IsClearAdaptiveDataSet { get; }
Property Value
Names
public virtual Span[] Names { get; }
Property Value
- Span[]
Sentence
public virtual string[] Sentence { get; }
Property Value
- string[]
Methods
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
Parse(string, bool)
public static NameSample Parse(string taggedTokens, bool isClearAdaptiveData)
Parameters
Returns
Exceptions
- IOException
if the tagged tokens cannot be parsed
Parse(string, string, bool)
public static NameSample Parse(string taggedTokens, string defaultType, bool isClearAdaptiveData)
Parameters
Returns
Exceptions
- IOException
if the tagged tokens cannot be parsed
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.