Class LinkedSpan<T>

Namespace
NOpenNLP.Tools.Entitylinker
Assembly
NOpenNLP.Tools.dll

A "default" extended span that holds additional information about the Span.

public class LinkedSpan<T> : Span, IComparable<Span> where T : BaseLink

Type Parameters

T

The type of the linked entries.

Inheritance
LinkedSpan<T>
Implements
Inherited Members

Constructors

LinkedSpan(IList<T>, Span, int)

public LinkedSpan(IList<T> linkedEntries, Span span, int offset)

Parameters

linkedEntries IList<T>
span Span
offset int

LinkedSpan(IList<T>, int, int)

public LinkedSpan(IList<T> linkedEntries, int s, int e)

Parameters

linkedEntries IList<T>
s int
e int

LinkedSpan(IList<T>, int, int, string?)

public LinkedSpan(IList<T> linkedEntries, int s, int e, string? type)

Parameters

linkedEntries IList<T>
s int
e int
type string

LinkedSpan(IList<T>, int, int, string?, double)

public LinkedSpan(IList<T> linkedEntries, int s, int e, string? type, double prob)

Parameters

linkedEntries IList<T>
s int
e int
type string
prob double

Properties

LinkedEntries

Gets or sets the n best linked entries from an external data source. For instance, this will hold gazateer entries for a search into a geonames gazateer.

public IList<T> LinkedEntries { get; set; }

Property Value

IList<T>

SearchTerm

Gets or sets the search term that was used to link this span to an external data source.

public string? SearchTerm { get; set; }

Property Value

string

SentenceId

Gets or sets the id or index of the sentence from which this span was extracted.

public int SentenceId { get; set; }

Property Value

int

Methods

Equals(object?)

Checks if the specified span is equal to the current span.

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

Generates a hash code of the current span.

public override int GetHashCode()

Returns

int

ToString()

Generates a human readable string.

public override string ToString()

Returns

string