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

java.lang.Object
  extended by edu.washington.cs.knowitall.nlp.extraction.SpanExtraction
      extended by edu.washington.cs.knowitall.nlp.extraction.ChunkedBinaryExtraction
          extended by edu.washington.cs.knowitall.extractor.conf.LabeledBinaryExtraction

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
 
Fields inherited from class edu.washington.cs.knowitall.nlp.extraction.ChunkedBinaryExtraction
ARG1, ARG2, REL
 
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(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, getChunkTags, getIndices, getPosTags, getRelation, getTokens, productOfArgs, productOfArgs, toString
 
Methods inherited from class edu.washington.cs.knowitall.nlp.extraction.SpanExtraction
getField, getField, getFieldName, getFieldNames, getFieldRange, getFieldRange, getFieldRanges, getFields, getNumFields, getProperties, getProperty, getPropertyNames, getSentence, hasField, hasProperty, setProperties, setProperty, toBIOLayer
 
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 SpanExtraction

equals

public boolean equals(Object obj)
Overrides:
equals in class SpanExtraction


Copyright © 2010-2012 University of Washington CSE. All Rights Reserved.