edu.washington.cs.knowitall.nlp.extraction
Class ChunkedExtraction

java.lang.Object
  extended by edu.washington.cs.knowitall.sequence.SimpleLayeredSequence
      extended by edu.washington.cs.knowitall.sequence.BIOLayeredSequence
          extended by edu.washington.cs.knowitall.nlp.ChunkedSentence
              extended by edu.washington.cs.knowitall.nlp.extraction.ChunkedExtraction
All Implemented Interfaces:
LayeredSequence
Direct Known Subclasses:
ChunkedArgumentExtraction

public class ChunkedExtraction
extends ChunkedSentence

An extraction object that represents a contiguous subsequence of a ChunkedSentence object.

Author:
afader

Field Summary
 
Fields inherited from class edu.washington.cs.knowitall.nlp.ChunkedSentence
NP_LAYER, offsets, POS_LAYER, TOKEN_LAYER
 
Constructor Summary
ChunkedExtraction(ChunkedSentence sent, edu.washington.cs.knowitall.commonlib.Range range)
          Constructs a new ChunkedExtraction object representing range in the sentence sent.
ChunkedExtraction(ChunkedSentence sent, edu.washington.cs.knowitall.commonlib.Range range, String string)
          Constructs a new NpChunkedExtraction object representing range in the sentence sent.
 
Method Summary
 boolean equals(Object obj)
           
 edu.washington.cs.knowitall.commonlib.Range getRange()
           
 ChunkedSentence getSentence()
           
 int getStart()
           
 String getText()
           
 int hashCode()
           
 boolean isAdjacentOrOverlaps(ChunkedExtraction extr)
           
 boolean overlapsWith(ChunkedExtraction extr)
           
 String toString()
           
 
Methods inherited from class edu.washington.cs.knowitall.nlp.ChunkedSentence
clone, getChunkTag, getChunkTags, getChunkTags, getChunkTags, getChunkTagsAsString, getNpChunkRanges, getOffsets, getOffsetsAsString, getPosTag, getPosTags, getPosTags, getPosTags, getPosTagsAsString, getPosTagsAsString, getPosTagsAsString, getSubSequence, getSubSequence, getToken, getTokenRange, getTokens, getTokens, getTokens, getTokensAsString, getTokensAsString, getTokensAsString, toOpenNlpFormat
 
Methods inherited from class edu.washington.cs.knowitall.sequence.BIOLayeredSequence
addSpanLayer, addSpanLayerRanges, getSpans, getSpans, getSubSequence, getSubSequence, isSpanLayer
 
Methods inherited from class edu.washington.cs.knowitall.sequence.SimpleLayeredSequence
addLayer, addLayer, addLayer, get, getLayer, getLayerAsString, getLayerAsString, getLayerAsString, getLayerNames, getLength, getNumLayers, hasLayer
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChunkedExtraction

public ChunkedExtraction(ChunkedSentence sent,
                         edu.washington.cs.knowitall.commonlib.Range range)
Constructs a new ChunkedExtraction object representing range in the sentence sent. range must be a subset of [0, sent.getLength() ).

Parameters:
sent - the source sentence.
range - the subsequence of sent that this extraction will represent.

ChunkedExtraction

public ChunkedExtraction(ChunkedSentence sent,
                         edu.washington.cs.knowitall.commonlib.Range range,
                         String string)
Constructs a new NpChunkedExtraction object representing range in the sentence sent. range must be a subset of [0, sent.getLength()).

Parameters:
sent - the source sentence.
range - the subsequence of sent that this extraction will represent.
string - a string representation of the relation part, usually different than just the subsequence in the sentence.
Method Detail

getStart

public int getStart()
Returns:
the start index of the extraction.

getRange

public edu.washington.cs.knowitall.commonlib.Range getRange()
Overrides:
getRange in class ChunkedSentence
Returns:
the Range object that represents the subsequence in the source sentence.

getSentence

public ChunkedSentence getSentence()
Returns:
the source sentence of this extraction.

isAdjacentOrOverlaps

public boolean isAdjacentOrOverlaps(ChunkedExtraction extr)
Parameters:
extr -
Returns:
true if this extraction is adjacent to or overlaps with extr in this sentence.

overlapsWith

public boolean overlapsWith(ChunkedExtraction extr)
Parameters:
extr -
Returns:
true if this extraction overlaps with extr in this sentence.

hashCode

public int hashCode()
Overrides:
hashCode in class SimpleLayeredSequence

equals

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

getText

public String getText()

toString

public String toString()
Overrides:
toString in class ChunkedSentence
Returns:
the tokens of this sentence joined by spaces


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