edu.washington.cs.knowitall.extractor.mapper
Class MergeOverlappingMapper

java.lang.Object
  extended by edu.washington.cs.knowitall.extractor.mapper.Mapper<ChunkedExtraction>
      extended by edu.washington.cs.knowitall.extractor.mapper.MergeOverlappingMapper

public class MergeOverlappingMapper
extends Mapper<ChunkedExtraction>

Given a set of ChunkedExtractions from the same sentence, merges those extractions that are next to each other or overlapping. For example, given the sentence "He wants to go to the store" and the relations "wants to" and "go to", returns "wants to go to".

Author:
afader

Constructor Summary
MergeOverlappingMapper()
           
 
Method Summary
protected  java.lang.Iterable<ChunkedExtraction> doMap(java.lang.Iterable<ChunkedExtraction> extrs)
           
static java.util.List<Range> mergeOverlapping(java.util.List<Range> ranges)
           
 
Methods inherited from class edu.washington.cs.knowitall.extractor.mapper.Mapper
disable, enable, isEnabled, map
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MergeOverlappingMapper

public MergeOverlappingMapper()
Method Detail

mergeOverlapping

public static java.util.List<Range> mergeOverlapping(java.util.List<Range> ranges)

doMap

protected java.lang.Iterable<ChunkedExtraction> doMap(java.lang.Iterable<ChunkedExtraction> extrs)
Specified by:
doMap in class Mapper<ChunkedExtraction>
Parameters:
extrs - a stream of objects
Returns:
a modified stream of objects