edu.stanford.nlp.trees.international.icegb
Class ICEGBLabel

java.lang.Object
  extended by edu.stanford.nlp.trees.international.icegb.ICEGBLabel
All Implemented Interfaces:
HasCategory, Label

public class ICEGBLabel
extends Object
implements HasCategory, Label

An object for labels as implemented in the ICE-GB corpus. The label includes a category, a function and a List of features

Author:
Pi-Chuan Chang

Constructor Summary
ICEGBLabel()
           
ICEGBLabel(Label oldLabel)
           
ICEGBLabel(String str)
           
 
Method Summary
 String category()
          Return the category value of the label (or null if none).
 Set features()
          Retrieves the feature values
 String function()
          Retrieves the functional category
 LabelFactory labelFactory()
          Returns a factory that makes ICEGBLabels.
static void main(String[] args)
          test only
 void setCategory(String cat)
          Set the category value for the label (if one is stored).
 void setFeatures(Set feat)
          Sets the feature values
 void setFromString(String str)
          Set the contents of this label to this String representing the complete contents of the label.
 void setFunction(String function)
          Sets the functional category
 void setValue(String val)
          Set the value for the label (if one is stored).
 void setWord(String word)
           
 String toString()
          Return a String representation of the label.
 String value()
          Return a String representation of just the "main" value of this label.
 String word()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ICEGBLabel

public ICEGBLabel()

ICEGBLabel

public ICEGBLabel(Label oldLabel)

ICEGBLabel

public ICEGBLabel(String str)
Method Detail

category

public String category()
Description copied from interface: HasCategory
Return the category value of the label (or null if none).

Specified by:
category in interface HasCategory
Returns:
String the category value for the label

value

public String value()
Description copied from interface: Label
Return a String representation of just the "main" value of this label.

Specified by:
value in interface Label
Returns:
the "value" of the label

setCategory

public void setCategory(String cat)
Description copied from interface: HasCategory
Set the category value for the label (if one is stored).

Specified by:
setCategory in interface HasCategory
Parameters:
cat - The category value for the label

setValue

public void setValue(String val)
Description copied from interface: Label
Set the value for the label (if one is stored).

Specified by:
setValue in interface Label
Parameters:
val - - the value for the label

setFunction

public void setFunction(String function)
Sets the functional category


function

public String function()
Retrieves the functional category


setWord

public void setWord(String word)

word

public String word()

setFromString

public void setFromString(String str)
Description copied from interface: Label
Set the contents of this label to this String representing the complete contents of the label. A class implementing label may throw an UnsupportedOperationException for this method (only). Typically, this method would do some appropriate decoding of the string in a way that sets multiple fields in an inverse of the toString() method.

Specified by:
setFromString in interface Label
Parameters:
str - the String that translates into the content of the label

setFeatures

public void setFeatures(Set feat)
Sets the feature values


features

public Set features()
Retrieves the feature values


labelFactory

public LabelFactory labelFactory()
Returns a factory that makes ICEGBLabels.

Specified by:
labelFactory in interface Label
Returns:
the LabelFactory for this kind of label

toString

public String toString()
Description copied from interface: Label
Return a String representation of the label. For a multipart label, this will return all parts. The toString() method causes a label to spill its guts. It should always return an empty string rather than null if there is no value.

Specified by:
toString in interface Label
Overrides:
toString in class Object
Returns:
a text representation of the full label contents

main

public static void main(String[] args)
test only



Stanford NLP Group