edu.northwestern.at.wordhoard.swing.calculator.analysis
Class CompareMultipleWordFrequencies

java.lang.Object
  extended by edu.northwestern.at.wordhoard.swing.calculator.analysis.FrequencyAnalysisRunnerBase
      extended by edu.northwestern.at.wordhoard.swing.calculator.analysis.CompareMultipleWordFrequencies
All Implemented Interfaces:
AnalysisRunner

public class CompareMultipleWordFrequencies
extends FrequencyAnalysisRunnerBase
implements AnalysisRunner

Generates a word form frequency comparison between two sets of works.


Field Summary
protected static int LOGLIKECOLUMN
          Column containing log-likelihood values in output table.
protected static int OVERUSECOLUMN
          Column containing overuse values in output table.
protected static int WORDCLASSCOLUMN
          Column containing word classes in output table.
 
Fields inherited from class edu.northwestern.at.wordhoard.swing.calculator.analysis.FrequencyAnalysisRunnerBase
adjustChiSquareForMultipleComparisons, analysisText, analysisTextBreakdownBy, analyzePhraseFrequencies, associationMeasure, blankReplacementCharacter, collocationOccurrenceMap, colorCodeOveruseColumn, compressValueRangeInTagClouds, contextButton, cutoff, displayProgress, filterBigramsByWordClass, filterMultiwordUnitsContainingVerbs, filterOutProperNames, filterSingleOccurrences, filterTrigramsByWordClass, filterUsingLocalMaxs, FONT_SIZE, frequencyAnalysisType, frequencyNormalizationMethod, FrequencyProfileResults, ignoreCaseAndDiacriticalMarks, leftSpan, markSignificantLogLikelihoodValues, maximumMultiwordUnitLength, minimumCount, minimumMultiwordUnitLength, minimumWorkCount, model, percentReportMethod, pluralWordFormString, progressReporter, referenceText, referenceTextBreakdownBy, resultsPanel, resultsScrollPane, resultsTable, rightSpan, roundNormalizedFrequencies, showPhraseFrequencies, showWordClasses, tableSelectionListener, useShortWorkTitlesInDialogs, useShortWorkTitlesInHeaders, useShortWorkTitlesInOutput, useShortWorkTitlesInWindowTitles, wordForm, wordFormString, wordOccs, wordToAnalyze
 
Constructor Summary
CompareMultipleWordFrequencies()
          Create a multiple word form frequency profile object.
 
Method Summary
 boolean areResultOptionsAvailable()
          Are result options available?
static void doFreq(Spelling wordToAnalyze, int wordForm, int analysisCount, int analysisTotalCount, int refCount, int refTotalCount, int percentReportMethod, WordHoardSortedTableModel model)
          Perform frequency comparison of analysis and reference works for a word.
protected  ResultsPanel generateResults(Spelling wordToAnalyze, WordHoardSortedTableModel model, java.lang.String maxLabel, java.lang.String maxLabel2, int analysisDistinct, int analysisTotal, int referenceDistinct, int referenceTotal)
          Displays results of frequency analysis in a sorted table.
 ResultsPanel getCloud()
          Show tag cloud of Dunning's log-likelihood profile.
 LabeledColumn getResultOptions()
          Return result options.
 boolean isCloudAvailable()
          Is cloud output available?
 void runAnalysis(javax.swing.JFrame parentWindow, ProgressReporter progressReporter)
          Run an analysis.
 
Methods inherited from class edu.northwestern.at.wordhoard.swing.calculator.analysis.FrequencyAnalysisRunnerBase
closeProgressReporter, createCloudAssociationMeasuresComboBox, createCompressValueRangeInTagCloudsCheckBox, generateResults, getAnalysisPercentColumnName, getChart, getCloud, getColTitleWordFormString, getContext, getDoubleFormat, getPercentReportMethodFormat, getReferencePercentColumnName, getResults, getTableFontSize, getTitle, handleTableSelectionChange, isCancelled, isChartAvailable, isContextAvailable, isFilterAvailable, saveChart, setContextButton, showDialog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.northwestern.at.wordhoard.swing.calculator.analysis.AnalysisRunner
getChart, getContext, getResults, handleTableSelectionChange, isChartAvailable, isContextAvailable, isFilterAvailable, saveChart, setContextButton, showDialog
 

Field Detail

WORDCLASSCOLUMN

protected static final int WORDCLASSCOLUMN
Column containing word classes in output table.

See Also:
Constant Field Values

OVERUSECOLUMN

protected static final int OVERUSECOLUMN
Column containing overuse values in output table.

See Also:
Constant Field Values

LOGLIKECOLUMN

protected static final int LOGLIKECOLUMN
Column containing log-likelihood values in output table.

See Also:
Constant Field Values
Constructor Detail

CompareMultipleWordFrequencies

public CompareMultipleWordFrequencies()
Create a multiple word form frequency profile object.

Method Detail

runAnalysis

public void runAnalysis(javax.swing.JFrame parentWindow,
                        ProgressReporter progressReporter)
Run an analysis.

Specified by:
runAnalysis in interface AnalysisRunner
Overrides:
runAnalysis in class FrequencyAnalysisRunnerBase
Parameters:
parentWindow - Parent window for dialogs in the analysis.
progressReporter - Progress display for analysis.

doFreq

public static void doFreq(Spelling wordToAnalyze,
                          int wordForm,
                          int analysisCount,
                          int analysisTotalCount,
                          int refCount,
                          int refTotalCount,
                          int percentReportMethod,
                          WordHoardSortedTableModel model)
Perform frequency comparison of analysis and reference works for a word.

Parameters:
wordToAnalyze - The word to analyze.
wordForm - The word form type.
analysisCount - Count of word in analysis text.
analysisTotalCount - Total number of words in analysis text.
refCount - Count of collocate in reference text.
refTotalCount - Total number of words in reference text.
percentReportMethod - Percent report method.
model - Table model in which to store results.

generateResults

protected ResultsPanel generateResults(Spelling wordToAnalyze,
                                       WordHoardSortedTableModel model,
                                       java.lang.String maxLabel,
                                       java.lang.String maxLabel2,
                                       int analysisDistinct,
                                       int analysisTotal,
                                       int referenceDistinct,
                                       int referenceTotal)
Displays results of frequency analysis in a sorted table.

Parameters:
wordToAnalyze - Word form being analyzed.
model - Table model holding data to display.
maxLabel - Maximum width value for first table column.
maxLabel2 - Maximum width value for second table column.
analysisDistinct - Distinct words in analysis text.
analysisTotal - Total words in analysis text.
referenceDistinct - Distinct words in reference text.
referenceTotal - Total words in reference text.
Returns:
ResultsPanel with table and title.

areResultOptionsAvailable

public boolean areResultOptionsAvailable()
Are result options available?

Specified by:
areResultOptionsAvailable in interface AnalysisRunner
Overrides:
areResultOptionsAvailable in class FrequencyAnalysisRunnerBase
Returns:
true if result options are available, false otherwise.

getResultOptions

public LabeledColumn getResultOptions()
Return result options.

Specified by:
getResultOptions in interface AnalysisRunner
Overrides:
getResultOptions in class FrequencyAnalysisRunnerBase
Returns:
Result options in a LabeledColumn.

isCloudAvailable

public boolean isCloudAvailable()
Is cloud output available?

Specified by:
isCloudAvailable in interface AnalysisRunner
Overrides:
isCloudAvailable in class FrequencyAnalysisRunnerBase
Returns:
true if cloud output available, false otherwise.

getCloud

public ResultsPanel getCloud()
Show tag cloud of Dunning's log-likelihood profile.

Specified by:
getCloud in interface AnalysisRunner
Overrides:
getCloud in class FrequencyAnalysisRunnerBase
Returns:
ResultsPanel containing the cloud.