edu.washington.cs.knowitall.nlp.extraction
Class ChunkedExtraction
java.lang.Object
edu.washington.cs.knowitall.sequence.SimpleLayeredSequence
edu.washington.cs.knowitall.sequence.BIOLayeredSequence
edu.washington.cs.knowitall.nlp.ChunkedSentence
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
| 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.SimpleLayeredSequence |
addLayer, addLayer, addLayer, get, getLayer, getLayerAsString, getLayerAsString, getLayerAsString, getLayerNames, getLength, getNumLayers, hasLayer |
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.
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.