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

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

public class CompareSingleWordFrequencies
extends FrequencyAnalysisRunnerBase
implements AnalysisRunner

Compares a single word form's frequency 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
CompareSingleWordFrequencies()
          Create a single word form frequency profile object.
 
Method Summary
protected  void doFreq(Spelling wordToAnalyze, int analysisCount, int analysisTotalCount, int refCount, int refTotalCount, WordHoardSortedTableModel model)
          Perform frequency comparison of analysis and reference works for a word.
protected  ResultsPanel generateResults(WordHoardSortedTableModel model, int analysisDistinct, int analysisTotal, int referenceDistinct, int referenceTotal)
          Displays results of frequency analysis in a sorted table.
static void reorderCompareResultsTableColumns(javax.swing.JTable resultsTable)
          Reorder columns for display.
 void runAnalysis(javax.swing.JFrame parentWindow, ProgressReporter progressReporter)
          Run an analysis.
 
Methods inherited from class edu.northwestern.at.wordhoard.swing.calculator.analysis.FrequencyAnalysisRunnerBase
areResultOptionsAvailable, closeProgressReporter, createCloudAssociationMeasuresComboBox, createCompressValueRangeInTagCloudsCheckBox, generateResults, getAnalysisPercentColumnName, getChart, getCloud, getCloud, getColTitleWordFormString, getContext, getDoubleFormat, getPercentReportMethodFormat, getReferencePercentColumnName, getResultOptions, getResults, getTableFontSize, getTitle, handleTableSelectionChange, isCancelled, isChartAvailable, isCloudAvailable, 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
areResultOptionsAvailable, getChart, getCloud, getContext, getResultOptions, getResults, handleTableSelectionChange, isChartAvailable, isCloudAvailable, 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

CompareSingleWordFrequencies

public CompareSingleWordFrequencies()
Create a single 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

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

Parameters:
wordToAnalyze - The word to analyze.
analysisCount - Count of word in analysis text.
analysisTotalCount - Total number of words in analysis text.
refCount - Count of word in reference text.
refTotalCount - Total number of words in reference text.
model - Table model in which to store results.

generateResults

protected ResultsPanel generateResults(WordHoardSortedTableModel model,
                                       int analysisDistinct,
                                       int analysisTotal,
                                       int referenceDistinct,
                                       int referenceTotal)
Displays results of frequency analysis in a sorted table.

Parameters:
model - Table model holding data to display.
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.

reorderCompareResultsTableColumns

public static void reorderCompareResultsTableColumns(javax.swing.JTable resultsTable)
Reorder columns for display.

Parameters:
resultsTable - The results table.

Static method so it can be used by sibling analyses.