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

java.lang.Object
  extended by edu.northwestern.at.wordhoard.swing.calculator.analysis.FrequencyAnalysisRunnerBase
      extended by edu.northwestern.at.wordhoard.swing.calculator.analysis.CollocateFrequencies
All Implemented Interfaces:
AnalysisRunner
Direct Known Subclasses:
CompareCollocateFrequencies, FindCollocates

public class CollocateFrequencies
extends FrequencyAnalysisRunnerBase
implements AnalysisRunner

Displays collocate frequencies for selected works.


Field Summary
 
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
CollocateFrequencies(int dialogType)
          Create a collocate frequency analysis object.
 
Method Summary
protected  ResultsPanel generateResults(WordHoardSortedTableModel model, java.lang.String maxLabel, java.lang.String maxLabel2)
          Displays results of collocation frequency analysis in a sorted table.
protected  java.util.TreeMap[] getCollocateCounts(WordCounter wordCounter, Spelling wordToAnalyze, ProgressReporter progressReporter, java.lang.String progressReporterText)
          Get collocation counts.
 void runAnalysis(javax.swing.JFrame parentWindow, ProgressReporter progressReporter)
          Run 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
 

Constructor Detail

CollocateFrequencies

public CollocateFrequencies(int dialogType)
Create a collocate frequency analysis object.

Parameters:
dialogType - Type of collocation analysis.
Method Detail

getCollocateCounts

protected java.util.TreeMap[] getCollocateCounts(WordCounter wordCounter,
                                                 Spelling wordToAnalyze,
                                                 ProgressReporter progressReporter,
                                                 java.lang.String progressReporterText)
Get collocation counts.

Parameters:
wordCounter - The texts in which to find collocates.
wordToAnalyze - The words for which to find collocates.
progressReporterText - Progress dialog text.
Returns:
Two element array of TreeMap [0] TreeMap with collocates as keys and frequencies as values, cutoff honored. [1] TreeMap with collocates as keys and work frequencies as values. [2] TreeMap with collocates as keys and frequencies as values, ignoring cutoff.

If the progress dialog is cancelled, the return value is null.


runAnalysis

public void runAnalysis(javax.swing.JFrame parentWindow,
                        ProgressReporter progressReporter)
Run 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.

generateResults

protected ResultsPanel generateResults(WordHoardSortedTableModel model,
                                       java.lang.String maxLabel,
                                       java.lang.String maxLabel2)
Displays results of collocation frequency analysis in a sorted table.

Parameters:
model - Table model holding data to display.
maxLabel - Maximum width value for label column.
maxLabel2 - Maximum width value for word class column.