|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.stanford.nlp.ie.pcfg.XLabel
An XLabel is a tree node label that holds certain information specific to the information extraction task (and my information extraction system in general). An XLabel has the following format: type+head[{tags}], e.g., VP+sold[{purchaser,acqloc}].
Field Summary | |
static String |
delim
the delimiter used to separate a label type from its head word |
String |
head
label head. |
List |
tags
a list of tags contained by the phrase represented by this label |
String |
type
label type. |
Constructor Summary | |
XLabel(String s)
construct a new XLabel from an existing string in XLabel format. |
Method Summary | |
void |
AddTag(String tag)
adds a tag if it hasn't already been added. |
void |
Copy(XLabel fromLabel,
boolean includeHead,
boolean includeTags)
Copies head and tag information from fromLabel to this label. |
boolean |
equals(Object o)
Checks whether two labels are equal |
int |
hashCode()
Gets a hash code for the label. |
static void |
main(String[] args)
|
boolean |
Similar(XLabel label2,
boolean includeHead,
boolean includeTags)
Checks whether two labels are the same. |
String |
toString()
Gets a string representation of the label. |
String |
toString(boolean includeHead,
boolean includeTags)
Gets a string representation of the label. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String delim
public String type
public String head
public List tags
Constructor Detail |
public XLabel(String s)
Method Detail |
public String toString(boolean includeHead, boolean includeTags)
public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object o)
equals
in class Object
public boolean Similar(XLabel label2, boolean includeHead, boolean includeTags)
includeHead
- if true, uses head information in its
comparison. if false, ignores head informationincludeTags
- if true, uses tag information in its
comparison. if false, ignores head informationpublic void AddTag(String tag)
public void Copy(XLabel fromLabel, boolean includeHead, boolean includeTags)
includeHead
- if head information should be copiedincludeTags
- if tag information should be copiedpublic static void main(String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |