edu.washington.cs.knowitall.extractor.conf
Class LabeledBinaryExtraction

java.lang.Object
  extended by edu.washington.cs.knowitall.nlp.extraction.ChunkedBinaryExtraction
      extended by edu.washington.cs.knowitall.extractor.conf.LabeledBinaryExtraction
All Implemented Interfaces:
Extraction<ChunkedSentence>

public class LabeledBinaryExtraction
extends ChunkedBinaryExtraction

Extends the ChunkedBinaryExtraction class to have a binary label.

Author:
afader

Field Summary
static int NEG
          the negative class label
static int POS
          the positive class label
 
Constructor Summary
LabeledBinaryExtraction(ChunkedBinaryExtraction extr, int label)
          Constructs a new LabeledBinaryExtraction with the given label.
LabeledBinaryExtraction(ChunkedExtraction relation, ChunkedArgumentExtraction argument1, ChunkedArgumentExtraction argument2, int label)
          Constructs a new LabeledBinaryExtraction with the given label
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 boolean isNegative()
           
 boolean isPositive()
           
 void setNegative()
          Sets the label to negative.
 void setPositive()
          Sets the label to positive.
 
Methods inherited from class edu.washington.cs.knowitall.nlp.extraction.ChunkedBinaryExtraction
getArgument1, getArgument2, getRelation, getSentence, getSource, productOfArgs, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

POS

public static final int POS
the positive class label

See Also:
Constant Field Values

NEG

public static final int NEG
the negative class label

See Also:
Constant Field Values
Constructor Detail

LabeledBinaryExtraction

public LabeledBinaryExtraction(ChunkedExtraction relation,
                               ChunkedArgumentExtraction argument1,
                               ChunkedArgumentExtraction argument2,
                               int label)
Constructs a new LabeledBinaryExtraction with the given label

Parameters:
relation -
argument1 -
argument2 -
label - either LabeledBinaryExtraction.POS or LabeledBinaryExtraction.NEG.

LabeledBinaryExtraction

public LabeledBinaryExtraction(ChunkedBinaryExtraction extr,
                               int label)
Constructs a new LabeledBinaryExtraction with the given label.

Parameters:
extr - an existing extraction
label - either LabeledBinaryExtraction.POS or LabeledBinaryExtraction.NEG.
Method Detail

setPositive

public void setPositive()
Sets the label to positive.


setNegative

public void setNegative()
Sets the label to negative.


isPositive

public boolean isPositive()
Returns:
true if positive

isNegative

public boolean isNegative()
Returns:
true if negative

hashCode

public int hashCode()
Overrides:
hashCode in class ChunkedBinaryExtraction

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class ChunkedBinaryExtraction