Package org.aksw.palmetto.prob.window
Class AbstractWindowBasedFrequencyDeterminer
- java.lang.Object
-
- org.aksw.palmetto.prob.window.AbstractWindowBasedFrequencyDeterminer
-
- All Implemented Interfaces:
FrequencyDeterminer,WindowBasedFrequencyDeterminer
- Direct Known Subclasses:
BooleanSlidingWindowFrequencyDeterminer,ContextWindowFrequencyDeterminer
public abstract class AbstractWindowBasedFrequencyDeterminer extends Object implements WindowBasedFrequencyDeterminer
-
-
Field Summary
Fields Modifier and Type Field Description protected WindowSupportingAdaptercorpusAdapterprotected intwindowSizeprotected long[]wordSetCountSums
-
Constructor Summary
Constructors Constructor Description AbstractWindowBasedFrequencyDeterminer(WindowSupportingAdapter corpusAdapter, int windowSize)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidaddCountsFromDocument(com.carrotsearch.hppc.IntArrayList[] positions, int[] counts, int docLength)protected int[]determineCounts(String[] wordset)CountedSubsets[]determineCounts(String[][] wordsets, SegmentationDefinition[] definitions)Returns the frequencies of words and word sub sets of the given word sets.protected abstract voiddetermineWordSetCountSum()long[]getCooccurrenceCounts()voidsetWindowSize(int windowSize)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.aksw.palmetto.prob.window.WindowBasedFrequencyDeterminer
getSlidingWindowModelName, getWindowSize
-
-
-
-
Field Detail
-
corpusAdapter
protected WindowSupportingAdapter corpusAdapter
-
windowSize
protected int windowSize
-
wordSetCountSums
protected long[] wordSetCountSums
-
-
Constructor Detail
-
AbstractWindowBasedFrequencyDeterminer
public AbstractWindowBasedFrequencyDeterminer(WindowSupportingAdapter corpusAdapter, int windowSize)
-
-
Method Detail
-
determineCounts
public CountedSubsets[] determineCounts(String[][] wordsets, SegmentationDefinition[] definitions)
Description copied from interface:FrequencyDeterminerReturns the frequencies of words and word sub sets of the given word sets.- Specified by:
determineCountsin interfaceFrequencyDeterminer- Returns:
-
determineCounts
protected int[] determineCounts(String[] wordset)
-
addCountsFromDocument
protected abstract void addCountsFromDocument(com.carrotsearch.hppc.IntArrayList[] positions, int[] counts, int docLength)
-
setWindowSize
public void setWindowSize(int windowSize)
- Specified by:
setWindowSizein interfaceWindowBasedFrequencyDeterminer
-
getCooccurrenceCounts
public long[] getCooccurrenceCounts()
- Specified by:
getCooccurrenceCountsin interfaceWindowBasedFrequencyDeterminer
-
determineWordSetCountSum
protected abstract void determineWordSetCountSum()
-
-