|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.wordhoard.swing.calculator.modelutils.WordCountUtils
public class WordCountUtils
Word count utilities.
Constructor Summary | |
---|---|
protected |
WordCountUtils()
Don't allow instantiation but do allow overrides. |
Method Summary | |
---|---|
static int |
getDistinctWordFormCount(WorkPart[] workParts,
int wordForm)
Get distinct word form count in a set of work parts. |
static java.util.Map[] |
getWordCounts(WorkPart[] workParts,
int wordForm)
Get word form counts in a set of work parts. |
static java.util.Map[] |
getWordCounts(WorkPart[] workParts,
int wordForm,
boolean getWorkCounts)
Get word form counts in a set of work parts. |
static java.util.Map[] |
getWordCounts(WorkPart[] workParts1,
WorkPart[] workParts2,
int wordForm)
Get word form counts in two arrays of work parts. |
static java.util.Map |
getWordCounts(WorkPart workPart,
int wordForm)
Get word counts in a single work part. |
static int |
getWordFormCount(WorkPart[] workParts,
int wordForm)
Get total word form count in a set of work parts. |
static java.util.Map |
getWordFormCount(WorkPart[] workParts,
Spelling[] words,
int wordForm)
Get word count for multiple words in a set of work parts. |
static int |
getWordFormCount(WorkPart[] workParts,
Spelling word,
int wordForm)
Get word count in a set of work parts. |
static int |
getWordFormCount(WorkPart workPart,
int wordForm)
Get total word form count in a work part. |
static int |
getWordFormCount(WorkPart workPart,
Spelling word,
int wordForm)
Get word count in a work part. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected WordCountUtils()
Method Detail |
---|
public static java.util.Map getWordFormCount(WorkPart[] workParts, Spelling[] words, int wordForm)
workParts
- The work parts.words
- The words.wordForm
- The word form.
public static int getWordFormCount(WorkPart[] workParts, int wordForm)
workParts
- The work parts.wordForm
- The word form.
public static int getDistinctWordFormCount(WorkPart[] workParts, int wordForm)
workParts
- The work parts.wordForm
- The word form.
public static int getWordFormCount(WorkPart workPart, int wordForm)
workPart
- The work part.wordForm
- The word form.
public static int getWordFormCount(WorkPart[] workParts, Spelling word, int wordForm)
workParts
- The work parts.word
- The word.wordForm
- The word form.
public static int getWordFormCount(WorkPart workPart, Spelling word, int wordForm)
workPart
- The work part.word
- The word.wordForm
- The word form.
public static java.util.Map getWordCounts(WorkPart workPart, int wordForm)
workPart
- The work part.wordForm
- The word form to count.
public static java.util.Map[] getWordCounts(WorkPart[] workParts, int wordForm, boolean getWorkCounts)
workParts
- The work parts.wordForm
- The word form to count.getWorkCounts
- if true, work counts are returned in the second
result map (see below). If false, hashsets of
work IDs are returned in the second result map.
public static java.util.Map[] getWordCounts(WorkPart[] workParts, int wordForm)
workParts
- The work parts.wordForm
- The word form to count.
public static java.util.Map[] getWordCounts(WorkPart[] workParts1, WorkPart[] workParts2, int wordForm)
workParts1
- The first array of work parts.workParts2
- The second array of work parts.wordForm
- The word form to count.
The first map contains each word of the specified word form in the first set of work parts as a key and the count of the appearance of the word in the first set of work parts as a value.
The second map contains each word of the specified word form in the second set of work parts as a key and the count of the appearance of the word in the second set of work parts as a value.
The third map also has the word as the key but provides the number of works (NOT work parts) in which the word appears as a value in either of the two sets of work parts.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |