edu.washington.cs.knowitall.extractor.mapper
Class MergeOverlappingMapper
java.lang.Object
edu.washington.cs.knowitall.extractor.mapper.Mapper<ChunkedExtraction>
edu.washington.cs.knowitall.extractor.mapper.MergeOverlappingMapper
public class MergeOverlappingMapper
- extends Mapper<ChunkedExtraction>
Given a set of ChunkedExtraction
s 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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MergeOverlappingMapper
public MergeOverlappingMapper()
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