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 String
getBase()
Get the base formString
getPos()
Get the POS tagMascWord[]
getQuarks()
Get quarks of the tokenint
getTokenId()
Get ID of the token-
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)
Create a MascToken, which may combine multiple quarks- Parameters:
s
- The start of the token in the corpus filee
- The end of the token in the corpus filepennId
- The ID of the token as assigned by the Penn stand-off annotationpos
- The POS-tagbase
- The base formquarks
- Quarks contained in the token
-
-
Method Detail
-
getTokenId
public int getTokenId()
Get ID of the token- Returns:
- the ID
-
getBase
public String getBase()
Get the base form- Returns:
- the base form
-
getPos
public String getPos()
Get the POS tag- Returns:
- POS tag
-
getQuarks
public MascWord[] getQuarks()
Get quarks of the token- Returns:
- Array of quark references
-
-