|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.northwestern.at.wordhoard.swing.calculator.analysis.FrequencyAnalysisRunnerBase
public class FrequencyAnalysisRunnerBase
Base class for frequency analyses.
Field Summary | |
---|---|
protected boolean |
adjustChiSquareForMultipleComparisons
True to adjust chi-square values for number of comparisons. |
protected WordCounter |
analysisText
Analysis text. |
protected int |
analysisTextBreakdownBy
Analysis text breakdown method. |
protected boolean |
analyzePhraseFrequencies
True to compare phrase counts instead of word counts. |
protected int |
associationMeasure
Association measure for localmaxs. |
protected java.lang.String |
blankReplacementCharacter
Blank replacement character in tag clouds. |
protected java.util.TreeMap |
collocationOccurrenceMap
TreeMap of word occurrences for each collocate. |
protected boolean |
colorCodeOveruseColumn
True to use color coding for overuse table columns. |
protected boolean |
compressValueRangeInTagClouds
True to compress value range in tag clouds. |
protected javax.swing.JButton |
contextButton
The context button, if any. |
protected int |
cutoff
Minimum number of times collocate word must appear. |
protected boolean |
displayProgress
True to display progress dialog. |
protected boolean |
filterBigramsByWordClass
Filter bigrams by word class flag. |
protected boolean |
filterMultiwordUnitsContainingVerbs
Filter multiword units containing verbs. |
protected boolean |
filterOutProperNames
True to filter out proper names. |
boolean |
filterSingleOccurrences
Filter ngrams which occur only once. |
protected boolean |
filterTrigramsByWordClass
Filter trigrams by word class flag. |
boolean |
filterUsingLocalMaxs
Filter ngrams using localmaxs. |
protected static int |
FONT_SIZE
Font size for table. |
protected int |
frequencyAnalysisType
Type of frequency analysis. |
protected int |
frequencyNormalizationMethod
Normalization method for frequencies. |
protected java.util.ArrayList |
FrequencyProfileResults
Holds frequency analysis results. |
boolean |
ignoreCaseAndDiacriticalMarks
Ignore case and diacritical marks. |
protected int |
leftSpan
Number of words to left of word to look for collocates. |
protected boolean |
markSignificantLogLikelihoodValues
True to mark significant log-likelihood values in tabular display. |
protected int |
maximumMultiwordUnitLength
Maximum multiword unit length. |
protected int |
minimumCount
Minimum count for word to be analyzed. |
protected int |
minimumMultiwordUnitLength
Minimum multiword unit length. |
protected int |
minimumWorkCount
Minimum work count for word to be analyzed. |
protected WordHoardSortedTableModel |
model
WordHoardSortedTableModel for holding results. |
protected int |
percentReportMethod
Percent report method. |
protected java.lang.String |
pluralWordFormString
Displayable plural word form type. |
protected ProgressReporter |
progressReporter
Progress reporter. |
protected WordCounter |
referenceText
Reference text. |
protected int |
referenceTextBreakdownBy
Reference text breakdown method. |
protected ResultsPanel |
resultsPanel
The results panel. |
protected XScrollPane |
resultsScrollPane
The scroll pane around the results table. |
protected XTable |
resultsTable
The results table. |
protected int |
rightSpan
Number of words to right of word to look for collocates. |
protected boolean |
roundNormalizedFrequencies
True to round normalized frequencies. |
protected boolean |
showPhraseFrequencies
True to display phrase counts instead of word counts. |
protected boolean |
showWordClasses
True to display word classes for all words. |
protected javax.swing.event.ListSelectionListener |
tableSelectionListener
Watch for selection changes in results table. |
protected boolean |
useShortWorkTitlesInDialogs
True to use short work names in dialogs. |
protected boolean |
useShortWorkTitlesInHeaders
True to use short work names in headers. |
protected boolean |
useShortWorkTitlesInOutput
True to use short work names in output. |
protected boolean |
useShortWorkTitlesInWindowTitles
True to use short work names in titles. |
protected int |
wordForm
Word form type. |
protected java.lang.String |
wordFormString
Displayable word form type. |
protected Word[] |
wordOccs
Word occurrences for a collocation analysis. |
protected Spelling |
wordToAnalyze
Word to analyze (spelling, lemma, etc.). |
Constructor Summary | |
---|---|
FrequencyAnalysisRunnerBase(int frequencyAnalysisType)
Create a single word form frequency profile object. |
Method Summary | |
---|---|
boolean |
areResultOptionsAvailable()
Are result options available? |
boolean |
closeProgressReporter()
Close progress reporter. |
javax.swing.JComboBox |
createCloudAssociationMeasuresComboBox()
Create cloud association measures combobox. |
javax.swing.JCheckBox |
createCompressValueRangeInTagCloudsCheckBox()
Create compress cloud value range checkbox result option. |
protected ResultsPanel |
generateResults(Spelling wordToAnalyze,
java.lang.String title,
java.lang.String shortTitle,
java.lang.String[] columnLongValues,
java.lang.String[] columnFormats,
int initialSortColumn,
int logLikelihoodColumn,
int wordClassColumn,
WordHoardSortedTableModel model,
java.lang.String[] maxColumnValues)
Displays results of analysis in a sorted table. |
java.lang.String |
getAnalysisPercentColumnName()
Get analysis text percent column name. |
ResultsPanel |
getChart()
Chart results. |
ResultsPanel |
getCloud()
Cloud results. |
ResultsPanel |
getCloud(java.lang.String title,
java.lang.String[] headers,
boolean compressRange,
int scoreCol,
int overUseCol,
int wordClassCol)
Show tag cloud of association measure. |
java.lang.String |
getColTitleWordFormString(java.lang.String wordFormString)
Convert word form string to column title ready string. |
ResultsPanel |
getContext(javax.swing.JFrame parentWindow,
ProgressReporter progressReporter)
Get context results. |
java.lang.String |
getDoubleFormat(int decimalPlaces)
Get format for double value in table. |
java.lang.String |
getPercentReportMethodFormat()
Get format for percent report method. |
java.lang.String |
getReferencePercentColumnName()
Get reference text percent column name. |
LabeledColumn |
getResultOptions()
Result options. |
ResultsPanel |
getResults()
Get results. |
static int |
getTableFontSize()
Get table font size. |
java.lang.String |
getTitle(WordCounter wordCounter,
boolean useShortTitle)
Get title for a word counter. |
void |
handleTableSelectionChange(javax.swing.event.ListSelectionEvent event)
Handle selection change in results table. |
boolean |
isCancelled(ProgressReporter progressReporter)
Check if cancelled flag set in a progress reporter. |
boolean |
isChartAvailable()
Is chart output available? |
boolean |
isCloudAvailable()
Is cloud output available? |
boolean |
isContextAvailable()
Is context output available? |
boolean |
isFilterAvailable()
Is output filter available? |
void |
runAnalysis(javax.swing.JFrame parentWindow,
ProgressReporter progressReporter)
Run analysis. |
void |
saveChart()
Saves chart. |
void |
setContextButton(javax.swing.JButton contextButton)
Set the context button. |
boolean |
showDialog(javax.swing.JFrame parentFrame)
Display the frequency analysis dialog. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int frequencyAnalysisType
protected WordCounter analysisText
protected WordCounter referenceText
protected int minimumCount
protected int minimumWorkCount
protected java.util.ArrayList FrequencyProfileResults
protected int wordForm
protected java.lang.String wordFormString
protected java.lang.String pluralWordFormString
protected Spelling wordToAnalyze
protected int frequencyNormalizationMethod
protected boolean roundNormalizedFrequencies
protected int percentReportMethod
protected boolean markSignificantLogLikelihoodValues
protected boolean filterOutProperNames
protected boolean showWordClasses
protected boolean showPhraseFrequencies
protected boolean analyzePhraseFrequencies
protected int leftSpan
protected int rightSpan
protected int cutoff
protected Word[] wordOccs
protected java.util.TreeMap collocationOccurrenceMap
protected int analysisTextBreakdownBy
protected int referenceTextBreakdownBy
protected int associationMeasure
protected int minimumMultiwordUnitLength
protected int maximumMultiwordUnitLength
protected boolean filterBigramsByWordClass
protected boolean filterTrigramsByWordClass
protected boolean filterMultiwordUnitsContainingVerbs
public boolean filterUsingLocalMaxs
public boolean filterSingleOccurrences
public boolean ignoreCaseAndDiacriticalMarks
protected WordHoardSortedTableModel model
protected boolean displayProgress
protected ProgressReporter progressReporter
protected ResultsPanel resultsPanel
protected javax.swing.JButton contextButton
protected XTable resultsTable
protected XScrollPane resultsScrollPane
protected boolean colorCodeOveruseColumn
protected boolean adjustChiSquareForMultipleComparisons
protected static final int FONT_SIZE
protected boolean useShortWorkTitlesInDialogs
protected boolean useShortWorkTitlesInOutput
protected boolean useShortWorkTitlesInWindowTitles
protected boolean useShortWorkTitlesInHeaders
protected boolean compressValueRangeInTagClouds
protected java.lang.String blankReplacementCharacter
protected javax.swing.event.ListSelectionListener tableSelectionListener
Constructor Detail |
---|
public FrequencyAnalysisRunnerBase(int frequencyAnalysisType)
frequencyAnalysisType
- Type of frequency analysis. Method Detail |
---|
public boolean showDialog(javax.swing.JFrame parentFrame)
showDialog
in interface AnalysisRunner
parentFrame
- The parent window for the dialog.
public void runAnalysis(javax.swing.JFrame parentWindow, ProgressReporter progressReporter)
runAnalysis
in interface AnalysisRunner
parentWindow
- Parent window for dialogs in the analysis.progressReporter
- Progress display for analysis. public boolean closeProgressReporter()
public ResultsPanel getResults()
getResults
in interface AnalysisRunner
protected ResultsPanel generateResults(Spelling wordToAnalyze, java.lang.String title, java.lang.String shortTitle, java.lang.String[] columnLongValues, java.lang.String[] columnFormats, int initialSortColumn, int logLikelihoodColumn, int wordClassColumn, WordHoardSortedTableModel model, java.lang.String[] maxColumnValues)
wordToAnalyze
- The word being analyzed.title
- Long results title.shortTitle
- Short results title.columnLongValues
- Column long values to set column widths.columnFormats
- Column formats for results.initialSortColumn
- Results sorted by this column.logLikelihoodColumn
- Column containing log-likelihood values.wordClassColumn
- Column containing word classes.model
- Table model holding results.maxColumnValues
- Maximum width value for table columns.
If number of entries "k" is less than
the number of the table columns, only
the first "k" column widths are set. public static int getTableFontSize()
public boolean isChartAvailable()
isChartAvailable
in interface AnalysisRunner
public boolean isCloudAvailable()
isCloudAvailable
in interface AnalysisRunner
public boolean isFilterAvailable()
isFilterAvailable
in interface AnalysisRunner
public boolean areResultOptionsAvailable()
areResultOptionsAvailable
in interface AnalysisRunner
public boolean isContextAvailable()
isContextAvailable
in interface AnalysisRunner
public ResultsPanel getChart()
getChart
in interface AnalysisRunner
public ResultsPanel getCloud()
getCloud
in interface AnalysisRunner
public LabeledColumn getResultOptions()
getResultOptions
in interface AnalysisRunner
public javax.swing.JCheckBox createCompressValueRangeInTagCloudsCheckBox()
public javax.swing.JComboBox createCloudAssociationMeasuresComboBox()
public ResultsPanel getContext(javax.swing.JFrame parentWindow, ProgressReporter progressReporter)
getContext
in interface AnalysisRunner
parentWindow
- Parent window for dialogs in the analysis.progressReporter
- Progress display for analysis.
public void saveChart()
saveChart
in interface AnalysisRunner
public void setContextButton(javax.swing.JButton contextButton)
setContextButton
in interface AnalysisRunner
contextButton
- The context button. public void handleTableSelectionChange(javax.swing.event.ListSelectionEvent event)
handleTableSelectionChange
in interface AnalysisRunner
event
- Table selection event. public java.lang.String getColTitleWordFormString(java.lang.String wordFormString)
wordFormString
- The word form string
("spelling", "lemma", etc.)
public java.lang.String getAnalysisPercentColumnName()
public java.lang.String getReferencePercentColumnName()
public java.lang.String getPercentReportMethodFormat()
public java.lang.String getDoubleFormat(int decimalPlaces)
decimalPlaces
- Number of decimal places. public java.lang.String getTitle(WordCounter wordCounter, boolean useShortTitle)
wordCounter
- Word Counter whose title is desired.useShortTitle
- Return a short title.
public boolean isCancelled(ProgressReporter progressReporter)
progressReporter
- Progress reporter to check for cancel. public ResultsPanel getCloud(java.lang.String title, java.lang.String[] headers, boolean compressRange, int scoreCol, int overUseCol, int wordClassCol)
title
- Cloud title.headers
- Header lines for cloud.compressRange
- Compress range of cloud tag values.scoreCol
- Tag score column in table.overUseCol
- Over/underuse column in table.
-1 if none.wordClassCol
- Word class column in table.
-1 if none.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |