public class StatsCalculator extends Object
Constructor and Description |
---|
StatsCalculator() |
Modifier and Type | Method and Description |
---|---|
static int |
freq(IndexSearcher searcher,
String corpusToSearchIn,
String annotationSetToSearchIn,
String annotationType) |
static int |
freq(IndexSearcher searcher,
String corpusToSearchIn,
String annotationSetToSearchIn,
String annotationType,
String featureName) |
static int |
freq(IndexSearcher searcher,
String corpusToSearchIn,
String annotationSetToSearchIn,
String annotationType,
String featureName,
String value)
Allows retriving frequencies for the given parameters.
|
static int |
freq(List<Hit> patternsToSearchIn,
String annotationType,
boolean inMatchedSpan,
boolean inContext) |
static int |
freq(List<Hit> patternsToSearchIn,
String annotationType,
String feature,
String value,
boolean inMatchedSpan,
boolean inContext)
Allows retrieving frequencies for the given parameters.
|
static Map<String,Integer> |
freqForAllValues(List<Hit> patternsToSearchIn,
String annotationType,
String feature,
boolean inMatchedSpan,
boolean inContext)
Calculates frequencies for all possible values of the provided AT.feature
|
public static int freq(IndexSearcher searcher, String corpusToSearchIn, String annotationSetToSearchIn, String annotationType, String featureName, String value) throws SearchException
SearchException
public static int freq(IndexSearcher searcher, String corpusToSearchIn, String annotationSetToSearchIn, String annotationType) throws SearchException
SearchException
freq(IndexSearcher, String, String, String, String, String)
public static int freq(IndexSearcher searcher, String corpusToSearchIn, String annotationSetToSearchIn, String annotationType, String featureName) throws SearchException
SearchException
freq(IndexSearcher, String, String, String, String, String)
public static int freq(List<Hit> patternsToSearchIn, String annotationType, String feature, String value, boolean inMatchedSpan, boolean inContext) throws SearchException
value
- - set to null if only wants to retrieve frequencies for AT.featureinMatchedSpan
- - true if only interested in frequencies from the matched spans.inContext
- - true if only interested in frequencies from the contexts. Please note that both isMatchedSpan
and inContext can be set to true if interested in frequencies from the entire patterns, but cannot be set false
at the same time.SearchException
public static int freq(List<Hit> patternsToSearchIn, String annotationType, boolean inMatchedSpan, boolean inContext) throws SearchException
SearchException
freq(List, String, String, String, boolean, boolean)
public static Map<String,Integer> freqForAllValues(List<Hit> patternsToSearchIn, String annotationType, String feature, boolean inMatchedSpan, boolean inContext) throws SearchException
patternsToSearchIn
- annotationType
- feature
- inMatchedSpan
- inContext
- SearchException
Copyright © 2024 GATE. All rights reserved.