Package org.aksw.palmetto.evaluate
Class CoherenceEvaluation
- java.lang.Object
-
- org.aksw.palmetto.evaluate.CoherenceEvaluation
-
public class CoherenceEvaluation extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCoherenceEvaluation.ProbSuppConfigstatic classCoherenceEvaluation.StaticCorpusAdapterA simple corpus adapter that already contains the results for a single word set.static classCoherenceEvaluation.StaticWindowBasedFrequencyDeterminer
-
Field Summary
Fields Modifier and Type Field Description protected static AnyAnyANY_ANYprivate static DirectConfirmationMeasure[]CALCULATIONS_4_VECTOR_CREATIONprotected static intCSV_LINE_AGG_IDprotected static intCSV_LINE_COHERENCE_IDprotected static intCSV_LINE_DIR_MEASURE_IDprotected static intCSV_LINE_GAMMA_IDprotected static intCSV_LINE_IN_MEASURE_IDprotected static intCSV_LINE_LENGTHThe CSV lines are organized as follows: Probability estimator type Window size (empty if no window) Segmentation type Indirect measure (empty if not used) Gamma (empty if not used) Direct measure Aggregation Word Set Id Coherence valueprotected static intCSV_LINE_PRB_EST_IDprotected static intCSV_LINE_SEG_IDprotected static intCSV_LINE_WIN_SIZE_IDprotected static intCSV_LINE_WORD_SET_ID_IDprivate static org.slf4j.LoggerLOGGERprotected static intMAX_GAMMAprotected static intMIN_GAMMAprotected static OneOneAndSelfOO_AND_SELF_CREATORprivate static DirectConfirmationMeasure[]PROBABILITY_BASED_CALCULATIONSprivate static Segmentator[]SUBSET_CREATORSprivate static Aggregation[]SUMMARIZERSprivate static VectorBasedConfirmationMeasure[]VECTOR_BASED_CALCULATIONS
-
Constructor Summary
Constructors Constructor Description CoherenceEvaluation()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static voidcalculateCoherences(double[] values, String[] baseCSVLine, List<String[]> csvLines)private static voidcalculateCoherences(String[] wordSet, ProbabilityEstimator probEstimator, PrintStream pout, String[] baseCSVLine)private static voidcalculateCoherences(SubsetProbabilities probabilities, int wordSetLength, PrintStream pout, String[] baseCSVLine)private static voidcalculateContextWindowCoherences(String[] wordSet, int wordSetId, int s, WindowSupportingAdapter localAdapter, PrintStream pout)static voidcalculateResultsForTopic(String[] wordSet, int wordSetId, CorpusAdapter luceneAdapter, CoherenceEvaluation.ProbSuppConfig.Type basicProbType, PrintStream pout)private static voidcalculateSlidingWindowCoherences(String[] wordSet, int wordSetId, int s, WindowSupportingAdapter localAdapter, PrintStream pout)private static voidcalculateWindowCoherences(String[] wordSet, WindowBasedFrequencyDeterminer localFreqDeterminer, int minFrequency, PrintStream pout, String[] baseCSVLine)static voidmain(String[] args)private static voidprintCSVLines(List<String[]> csvLines, PrintStream pout)Prints the given CSV lines in a synchronized way using the given print stream.
-
-
-
Field Detail
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
MIN_GAMMA
protected static final int MIN_GAMMA
- See Also:
- Constant Field Values
-
MAX_GAMMA
protected static final int MAX_GAMMA
- See Also:
- Constant Field Values
-
CSV_LINE_LENGTH
protected static final int CSV_LINE_LENGTH
The CSV lines are organized as follows:- Probability estimator type
- Window size (empty if no window)
- Segmentation type
- Indirect measure (empty if not used)
- Gamma (empty if not used)
- Direct measure
- Aggregation
- Word Set Id
- Coherence value
- See Also:
- Constant Field Values
-
CSV_LINE_PRB_EST_ID
protected static final int CSV_LINE_PRB_EST_ID
- See Also:
- Constant Field Values
-
CSV_LINE_WIN_SIZE_ID
protected static final int CSV_LINE_WIN_SIZE_ID
- See Also:
- Constant Field Values
-
CSV_LINE_SEG_ID
protected static final int CSV_LINE_SEG_ID
- See Also:
- Constant Field Values
-
CSV_LINE_IN_MEASURE_ID
protected static final int CSV_LINE_IN_MEASURE_ID
- See Also:
- Constant Field Values
-
CSV_LINE_GAMMA_ID
protected static final int CSV_LINE_GAMMA_ID
- See Also:
- Constant Field Values
-
CSV_LINE_DIR_MEASURE_ID
protected static final int CSV_LINE_DIR_MEASURE_ID
- See Also:
- Constant Field Values
-
CSV_LINE_AGG_ID
protected static final int CSV_LINE_AGG_ID
- See Also:
- Constant Field Values
-
CSV_LINE_WORD_SET_ID_ID
protected static final int CSV_LINE_WORD_SET_ID_ID
- See Also:
- Constant Field Values
-
CSV_LINE_COHERENCE_ID
protected static final int CSV_LINE_COHERENCE_ID
- See Also:
- Constant Field Values
-
ANY_ANY
protected static final AnyAny ANY_ANY
-
OO_AND_SELF_CREATOR
protected static final OneOneAndSelf OO_AND_SELF_CREATOR
-
SUBSET_CREATORS
private static final Segmentator[] SUBSET_CREATORS
-
PROBABILITY_BASED_CALCULATIONS
private static final DirectConfirmationMeasure[] PROBABILITY_BASED_CALCULATIONS
-
VECTOR_BASED_CALCULATIONS
private static final VectorBasedConfirmationMeasure[] VECTOR_BASED_CALCULATIONS
-
CALCULATIONS_4_VECTOR_CREATION
private static final DirectConfirmationMeasure[] CALCULATIONS_4_VECTOR_CREATION
-
SUMMARIZERS
private static final Aggregation[] SUMMARIZERS
-
-
Method Detail
-
main
public static void main(String[] args)
-
calculateResultsForTopic
public static void calculateResultsForTopic(String[] wordSet, int wordSetId, CorpusAdapter luceneAdapter, CoherenceEvaluation.ProbSuppConfig.Type basicProbType, PrintStream pout) throws IOException
- Throws:
IOException
-
calculateSlidingWindowCoherences
private static void calculateSlidingWindowCoherences(String[] wordSet, int wordSetId, int s, WindowSupportingAdapter localAdapter, PrintStream pout)
-
calculateContextWindowCoherences
private static void calculateContextWindowCoherences(String[] wordSet, int wordSetId, int s, WindowSupportingAdapter localAdapter, PrintStream pout)
-
calculateWindowCoherences
private static void calculateWindowCoherences(String[] wordSet, WindowBasedFrequencyDeterminer localFreqDeterminer, int minFrequency, PrintStream pout, String[] baseCSVLine)
-
calculateCoherences
private static void calculateCoherences(String[] wordSet, ProbabilityEstimator probEstimator, PrintStream pout, String[] baseCSVLine)
-
calculateCoherences
private static void calculateCoherences(SubsetProbabilities probabilities, int wordSetLength, PrintStream pout, String[] baseCSVLine)
-
calculateCoherences
private static void calculateCoherences(double[] values, String[] baseCSVLine, List<String[]> csvLines)
-
printCSVLines
private static void printCSVLines(List<String[]> csvLines, PrintStream pout)
Prints the given CSV lines in a synchronized way using the given print stream. It uses the print stream object to synchronize.- Parameters:
csvLines-pout-
-
-