Package opennlp.tools.formats.masc
Klasse MascSentence
java.lang.Object
opennlp.tools.util.Span
opennlp.tools.formats.masc.MascSentence
- Alle implementierten Schnittstellen:
Serializable
,Comparable<Span>
- Siehe auch:
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Von Klasse geerbte Methoden opennlp.tools.util.Span
compareTo, contains, contains, crosses, equals, getCoveredText, getEnd, getProb, getStart, getType, hashCode, intersects, length, spansToStrings, spansToStrings, startsWith, toString, trim
-
Konstruktordetails
-
MascSentence
public MascSentence(int s, int e, String text, List<MascWord> sentenceQuarks, List<MascWord> allQuarks) Initializes aMascSentence
containing its associated text and quarks- Parameter:
s
- Start of the sentence within the corpus filee
- End of the sentence within the corpus filetext
- The reference to text of the corpus filesentenceQuarks
- The quarks found in that sentenceallQuarks
- The reference to a list of all quarks in the file
-
-
Methodendetails
-
getNamedEntities
- Gibt zurück:
- Retrieves the
named entities
, e.g.Span(1,3, "org")
for tokens [1,3).
-
getSentDetectText
- Gibt zurück:
- Retrieves text of the sentence as defined by the sentence segmentation annotation.
-
getTokenText
- Gibt zurück:
- Retrieves text of the sentence as defined by the tokens in it.
-
getTokenStrings
- Gibt zurück:
- The texts of the individual tokens in the sentence
-
getTokensSpans
Retrieves the boundaries of individual tokens.- Gibt zurück:
- The
spans
representing the tokens of the sentence, according to Penn tokenization.
-
getTags
- Gibt zurück:
- Get the (individual) tags of tokens in the sentence.
- Löst aus:
IOException
- Thrown if used on an un-tokenized sentence.
-