Class POSSample

Namespace
NOpenNLP.Tools.Postag
Assembly
NOpenNLP.Tools.dll

Represents an pos-tagged sentence.

public class POSSample
Inheritance
POSSample
Inherited Members

Constructors

POSSample(IList<string>, IList<string>, string[][]?)

public POSSample(IList<string> sentence, IList<string> tags, string[][]? additionalContext = null)

Parameters

sentence IList<string>
tags IList<string>
additionalContext string[][]

POSSample(string[], string[], string[][]?)

public POSSample(string[] sentence, string[] tags, string[][]? additionalContext = null)

Parameters

sentence string[]
tags string[]
additionalContext string[][]

Properties

AddictionalContext

public virtual string[][]? AddictionalContext { get; }

Property Value

string[][]

Sentence

public virtual string[] Sentence { get; }

Property Value

string[]

Tags

public virtual string[] Tags { 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

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

Parse(string)

public static POSSample Parse(string sentenceString)

Parameters

sentenceString string

Returns

POSSample

Exceptions

InvalidFormatException

if the sentence is not in the expected token_tag format.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.