uk.ac.gla.dcs.renaissance.iqir.in
Class SlidingWindowINExtractor

java.lang.Object
  extended by uk.ac.gla.dcs.renaissance.iqir.in.PureINExtractor
      extended by uk.ac.gla.dcs.renaissance.iqir.in.SlidingWindowINExtractor

public class SlidingWindowINExtractor
extends PureINExtractor

Uses sliding windows to extract pure information needs

For a term t
We report as many vectors as there are occurrences of the term. Each vector is made of the terms which are close to the term t (distance inferior or equal to the span)
For the document
We use a window of size 2 * span that we move each time by span (if possible, otherwise the maximum possible -- that is when we reach the end of the text)

Author:
B. Piwowarski

Nested Class Summary
static class SlidingWindowINExtractor.Weighting
           
 
Field Summary
protected static cern.colt.function.DoubleFunction PLUS_ONE
           
 
Constructor Summary
SlidingWindowINExtractor()
           
 
Method Summary
 Iterator<bpiwowar.maths.matrix.DoubleMatrix1D> getIterator(CompactDocument document)
          Get an iterator for the document pure information need aspects
 Iterator<bpiwowar.maths.matrix.DoubleMatrix1D> getIterator(CompactDocument document, Iterator<it.unimi.dsi.util.Interval> intervalIterator)
          Extract pure INs using an interval iterator
 SlidingWindowINExtractor.Weighting getWeighting()
           
 int getWindowSpan()
           
 boolean includesStopwords()
           
 void setIncludeStopwords(boolean includeStopwords)
           
 void setWeighting(SlidingWindowINExtractor.Weighting weighting)
           
 void setWindowSpan(int windowSpan)
           
 
Methods inherited from class uk.ac.gla.dcs.renaissance.iqir.in.PureINExtractor
init, vectors, vectors, vectors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PLUS_ONE

protected static final cern.colt.function.DoubleFunction PLUS_ONE
Constructor Detail

SlidingWindowINExtractor

public SlidingWindowINExtractor()
Method Detail

getIterator

public Iterator<bpiwowar.maths.matrix.DoubleMatrix1D> getIterator(CompactDocument document)
Description copied from class: PureINExtractor
Get an iterator for the document pure information need aspects

Specified by:
getIterator in class PureINExtractor
Parameters:
document - The document from which we want the aspects
Returns:
an iterator over vectors in the index term space

getIterator

public Iterator<bpiwowar.maths.matrix.DoubleMatrix1D> getIterator(CompactDocument document,
                                                                  Iterator<it.unimi.dsi.util.Interval> intervalIterator)
Description copied from class: PureINExtractor
Extract pure INs using an interval iterator

Specified by:
getIterator in class PureINExtractor

setIncludeStopwords

public void setIncludeStopwords(boolean includeStopwords)
Parameters:
includeStopwords - the includeStopwords to set

includesStopwords

public boolean includesStopwords()
Returns:
the includeStopwords

setWeighting

public void setWeighting(SlidingWindowINExtractor.Weighting weighting)

getWeighting

public SlidingWindowINExtractor.Weighting getWeighting()

setWindowSpan

public void setWindowSpan(int windowSpan)
Parameters:
windowSpan - the windowSpan to set

getWindowSpan

public int getWindowSpan()
Returns:
the windowSpan


Copyright © 2011. All Rights Reserved.