public class TermFrequencyList extends Results<TermFrequency>
hitsObjId, NO_LIMIT, results, threadPauser
Constructor and Description |
---|
TermFrequencyList(QueryInfo queryInfo,
Map<String,Integer> wordFreq,
boolean sort) |
Modifier and Type | Method and Description |
---|---|
static TermFrequencyList |
collocations(Hits hits,
Annotation annotation,
ContextSize contextSize,
MatchSensitivity sensitivity,
boolean sort)
Count occurrences of context words around hit.
|
boolean |
doneProcessingAndCounting()
Check if we're done retrieving/counting hits.
|
protected void |
ensureResultsRead(int number)
Ensure that we have read at least as many results as specified in the parameter.
|
TermFrequencyList |
filter(ResultProperty<TermFrequency> property,
PropertyValue value)
Select only the hits where the specified property has the specified value.
|
long |
frequency(String token)
Get the frequency of a specific token
|
TermFrequency |
get(int index)
Return the specified hit.
|
ResultGroups<TermFrequency> |
group(ResultProperty<TermFrequency> criteria,
int maxResultsToStorePerGroup)
Group these hits by a criterium (or several criteria).
|
Iterator<TermFrequency> |
iterator()
Return an iterator over these hits.
|
int |
numberOfResultObjects()
How many result objects does this search store?
Used for estimating the cache size.
|
TermFrequencyList |
sample(SampleParameters sampleParameters)
Take a sample of results.
|
int |
size()
This is an alias of resultsProcessedTotal().
|
<P extends ResultProperty<TermFrequency>> |
sort(P sortProp)
Return a new Results object with these results sorted by the given property.
|
TermFrequencyList |
subList(int fromIndex,
int toIndex) |
long |
totalFrequency() |
TermFrequencyList |
window(int first,
int windowSize)
Get a window into this list of results.
|
doFilter, doSample, doSort, doWindow, ensureAllResultsRead, field, index, isSample, isWindow, parallelStream, queryInfo, resultsCountedSoFar, resultsCountedTotal, resultsList, resultsObjId, resultsProcessedAtLeast, resultsProcessedSoFar, resultsProcessedTotal, resultsStats, resultsSubList, sampleParameters, stream, threadPauser, toString, windowStats
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public static TermFrequencyList collocations(Hits hits, Annotation annotation, ContextSize contextSize, MatchSensitivity sensitivity, boolean sort)
hits
- hits to get collocations forannotation
- annotation to use for the collocations, or null if defaultcontextSize
- how many words around hits to usesensitivity
- what sensitivity to usesort
- whether or not to sort the list by descending frequencypublic int size()
Results
size
in class Results<TermFrequency>
public Iterator<TermFrequency> iterator()
Results
iterator
in interface Iterable<TermFrequency>
iterator
in class Results<TermFrequency>
public TermFrequency get(int index)
Results
get
in class Results<TermFrequency>
index
- index of the desired hitpublic long frequency(String token)
token
- the token to get the frequency forpublic long totalFrequency()
public TermFrequencyList subList(int fromIndex, int toIndex)
protected void ensureResultsRead(int number)
Results
ensureResultsRead
in class Results<TermFrequency>
number
- the minimum number of results that will have been read when this
method returns (unless there are fewer hits than this); if
negative, reads all hitspublic ResultGroups<TermFrequency> group(ResultProperty<TermFrequency> criteria, int maxResultsToStorePerGroup)
Results
group
in class Results<TermFrequency>
criteria
- the hit property to group onmaxResultsToStorePerGroup
- maximum number of results to store per group, or -1 for allpublic TermFrequencyList filter(ResultProperty<TermFrequency> property, PropertyValue value)
Results
filter
in class Results<TermFrequency>
property
- property to select on, e.g. "word left of hit"value
- value to select on, e.g. 'the'public <P extends ResultProperty<TermFrequency>> TermFrequencyList sort(P sortProp)
Results
sort
in class Results<TermFrequency>
sortProp
- the property to sort onpublic TermFrequencyList window(int first, int windowSize)
Results
window
in class Results<TermFrequency>
first
- first result in the window (0-based)windowSize
- desired size of the window (if there's enough results)public TermFrequencyList sample(SampleParameters sampleParameters)
Results
sample
in class Results<TermFrequency>
sampleParameters
- sample parameterspublic boolean doneProcessingAndCounting()
Results
doneProcessingAndCounting
in class Results<TermFrequency>
public int numberOfResultObjects()
SearchResult
Copyright © 2020 Instituut voor Nederlandse Taal (INT). All rights reserved.