public class Tag extends StringLabel implements HasTag
Tag
object acts as a Label by containing a
String
that is a part-of-speech tag.Constructor and Description |
---|
Tag()
Constructs a Tag object.
|
Tag(Label lab)
Creates a new tag whose tag value is the value of any
class that supports the
Label interface. |
Tag(java.lang.String tag)
Constructs a Tag object.
|
Modifier and Type | Method and Description |
---|---|
static LabelFactory |
factory()
Return a factory for this kind of label
(i.e.,
Tag ). |
LabelFactory |
labelFactory()
Return a factory for this kind of label
(i.e.,
Tag ). |
void |
setTag(java.lang.String tag)
Set the tag value for the label (if one is stored).
|
java.lang.String |
tag()
Return the tag value of the label (or null if none).
|
beginPosition, endPosition, setBeginPosition, setEndPosition, setFromString, setValue, toString, value
compareTo, equals, hashCode
public Tag()
public Tag(java.lang.String tag)
tag
- The tag namepublic Tag(Label lab)
Label
interface.lab
- The label to be used as the basis of the new Tagpublic java.lang.String tag()
HasTag
public void setTag(java.lang.String tag)
HasTag
public LabelFactory labelFactory()
Tag
).
The factory returned is always the same one (a singleton).labelFactory
in interface Label
labelFactory
in class StringLabel
public static LabelFactory factory()
Tag
).
The factory returned is always the same one (a singleton).