Package opennlp.tools.entitylinker
Klasse LinkedSpan<T extends BaseLink>
java.lang.Object
opennlp.tools.util.Span
opennlp.tools.entitylinker.LinkedSpan<T>
- Typparameter:
T- The generic type that specializes aBaseLink.
- Alle implementierten Schnittstellen:
Serializable,Comparable<Span>
- Siehe auch:
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungLinkedSpan(ArrayList<T> linkedEntries, int s, int e) Initializes a newLinkedSpan.LinkedSpan(ArrayList<T> linkedEntries, int s, int e, String type) Initializes a newLinkedSpan.LinkedSpan(ArrayList<T> linkedEntries, int s, int e, String type, double prob) Initializes a newLinkedSpan.LinkedSpan(ArrayList<T> linkedEntries, Span span, int offset) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbooleanintinthashCode()voidsetLinkedEntries(ArrayList<T> linkedEntries) voidsetSearchTerm(String searchTerm) voidsetSentenceid(int sentenceid) toString()Von Klasse geerbte Methoden opennlp.tools.util.Span
compareTo, contains, contains, crosses, getCoveredText, getEnd, getProb, getStart, getType, intersects, length, spansToStrings, spansToStrings, startsWith, trim
-
Konstruktordetails
-
LinkedSpan
Initializes a newLinkedSpan. Sets the prob to0as default.- Parameter:
linkedEntries- Thenbest linked entries from an external data source.s- The start position of aSpan. Must be equal to or greater than0. Must not be greater thane.e- The end position of aSpan, which is+1more than the last element in the span. Must be equal to or greater than0.type- The type of the span.- Löst aus:
IllegalArgumentException- Thrown if given parameters are invalid.
-
LinkedSpan
Initializes a newLinkedSpan.- Parameter:
linkedEntries- Thenbest linked entries from an external data source.s- The start position of aSpan. Must be equal to or greater than0. Must not be greater thane.e- The end position of aSpan, which is+1more than the last element in the span. Must be equal to or greater than0.type- The type of the span.prob- The probability of theSpan.- Löst aus:
IllegalArgumentException- Thrown if given parameters are invalid.
-
LinkedSpan
Initializes a newLinkedSpan.- Parameter:
linkedEntries- Thenbest linked entries from an external data source.s- The start position of aSpan. Must be equal to or greater than0. Must not be greater thane.e- The end position of aSpan, which is+1more than the last element in the span. Must be equal to or greater than0.- Löst aus:
IllegalArgumentException- Thrown if given parameters are invalid.
-
LinkedSpan
- Parameter:
linkedEntries- Thenbest linked entries from an external data source.span- The existingSpan.offset- The positive or negative shift offset.- Löst aus:
IllegalArgumentException- Thrown if given parameters are invalid.
-
-
Methodendetails
-
getLinkedEntries
- Gibt zurück:
- Retrieves the
nbest linked entries from an external data source. For instance, this will hold gazetteer entries for a search into a geonames gazetteer.
-
setLinkedEntries
- Parameter:
linkedEntries- Thenbest linked entries from an external data source. For instance, this will hold gazetteer entries for a search into a geonames gazetteer.
-
getSentenceid
public int getSentenceid()- Gibt zurück:
- Retrieves the id or index of the sentence from which this span was extracted.
-
setSentenceid
public void setSentenceid(int sentenceid) - Parameter:
sentenceid- The id or index of the sentence from which this span was extracted.
-
getSearchTerm
- Gibt zurück:
- Retrieves the search term that was used to link this span to an external data source.
-
setSearchTerm
- Parameter:
searchTerm- The search term that is used to link this span to an external data source.
-
toString
-
hashCode
public int hashCode() -
equals
-