uk.ac.gla.dcs.renaissance.iqir.in
Class SlidingWindowINExtractor
java.lang.Object
uk.ac.gla.dcs.renaissance.iqir.in.PureINExtractor
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
Field Summary |
protected static cern.colt.function.DoubleFunction |
PLUS_ONE
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PLUS_ONE
protected static final cern.colt.function.DoubleFunction PLUS_ONE
SlidingWindowINExtractor
public SlidingWindowINExtractor()
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.