public class ContextWindowFrequencyDeterminer extends Object implements WindowBasedFrequencyDeterminer
| Modifier and Type | Field and Description |
|---|---|
private WindowSupportingAdapter |
corpusAdapter |
private int |
windowSize |
private long[] |
wordSetCountSums |
| Constructor and Description |
|---|
ContextWindowFrequencyDeterminer(WindowSupportingAdapter corpusAdapter,
int windowSize) |
| Modifier and Type | Method and Description |
|---|---|
private void |
addCountsFromDocument(com.carrotsearch.hppc.IntArrayList[] positions,
int[] counts,
int docLength) |
private 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 void |
determineWordSetCountSum() |
long[] |
getCooccurrenceCounts() |
String |
getSlidingWindowModelName() |
int |
getWindowSize() |
void |
setWindowSize(int windowSize) |
private WindowSupportingAdapter corpusAdapter
private int windowSize
private long[] wordSetCountSums
public ContextWindowFrequencyDeterminer(WindowSupportingAdapter corpusAdapter, int windowSize)
public CountedSubsets[] determineCounts(String[][] wordsets, SegmentationDefinition[] definitions)
FrequencyDeterminerdetermineCounts in interface FrequencyDeterminerprivate int[] determineCounts(String[] wordset)
private void addCountsFromDocument(com.carrotsearch.hppc.IntArrayList[] positions,
int[] counts,
int docLength)
public void setWindowSize(int windowSize)
setWindowSize in interface WindowBasedFrequencyDeterminerpublic long[] getCooccurrenceCounts()
getCooccurrenceCounts in interface WindowBasedFrequencyDeterminerpublic String getSlidingWindowModelName()
getSlidingWindowModelName in interface WindowBasedFrequencyDeterminerprotected void determineWordSetCountSum()
public int getWindowSize()
getWindowSize in interface WindowBasedFrequencyDeterminerCopyright © 2014–2016. All rights reserved.