Package opennlp.tools.formats.masc
Class MascToken
- java.lang.Object
-
- opennlp.tools.util.Span
-
- opennlp.tools.formats.masc.MascToken
-
- All Implemented Interfaces:
Serializable,Comparable<Span>
public class MascToken extends Span
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBase()StringgetPos()MascWord[]getQuarks()intgetTokenId()-
Methods inherited from class opennlp.tools.util.Span
compareTo, contains, contains, crosses, equals, getCoveredText, getEnd, getProb, getStart, getType, hashCode, intersects, length, spansToStrings, spansToStrings, startsWith, toString, trim
-
-
-
-
Constructor Detail
-
MascToken
public MascToken(int s, int e, int pennId, String pos, String base, MascWord[] quarks)Initializes aMascTokenwhich may combine multiple quarks.- Parameters:
s- The start of the token in the corpus file. Must be equal to or greater than0.e- The end of the token in the corpus file. Must be equal to or greater than0and be greater thans.pennId- The ID of the token as assigned by the Penn stand-off annotation.pos- The POS-tag.base- The base form.quarks- Thearray of Quarkscontained in the token.- Throws:
IllegalArgumentException- Thrown if one of the parameters are invalid.
-
-