public class DocCounts
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.util.ArrayList<java.lang.String> |
analysedSequenceDocs
List of analysed sequence document pairs
|
protected java.util.ArrayList<java.lang.String> |
analysedWordDocs
List of analysed word document pairs
|
protected java.util.HashMap<java.lang.String,java.lang.Float> |
docSequences
Popular sequences list.
|
protected java.util.HashMap<java.lang.String,java.lang.Float> |
docWords
List of most popular words only.
|
| Constructor and Description |
|---|
DocCounts()
Create a new instance of DocCounts.
|
| Modifier and Type | Method and Description |
|---|---|
void |
comparePopularWords(java.lang.String docName,
java.util.ArrayList<java.lang.String[]> wordList)
Update the counts based on the new word list.
|
void |
comparePopularWordSequences(java.lang.String docName,
java.util.ArrayList<java.util.ArrayList<java.lang.String[]>> sequenceList)
Update the counts based on the new word sequences list.
|
java.util.ArrayList<java.lang.String[]> |
reSortPopularWords(int popularWordsNumber)
Re-sort the popular words list so that only the specified top number remain.
|
java.util.ArrayList<java.lang.String[]> |
reSortWordSequences(int popularSequencesNumber)
Re-sort the word sequences list so that only the specified top number remain.
|
java.lang.String |
sequencesToString(java.util.ArrayList<java.util.ArrayList<java.lang.String[]>> popularSequences)
Convert the stored analysis into a textual format for displaying.
|
java.lang.String |
wordsToString(java.util.ArrayList<java.lang.String[]> popularWords)
Convert the stored analysis into a textual format for displaying.
|
protected java.util.ArrayList<java.lang.String> analysedWordDocs
protected java.util.ArrayList<java.lang.String> analysedSequenceDocs
protected java.util.HashMap<java.lang.String,java.lang.Float> docWords
protected java.util.HashMap<java.lang.String,java.lang.Float> docSequences
public void comparePopularWords(java.lang.String docName,
java.util.ArrayList<java.lang.String[]> wordList)
docName - the document name.wordList - new list of popular words.public void comparePopularWordSequences(java.lang.String docName,
java.util.ArrayList<java.util.ArrayList<java.lang.String[]>> sequenceList)
docName - the first document name.sequenceList - the new list of word sequences.public java.util.ArrayList<java.lang.String[]> reSortPopularWords(int popularWordsNumber)
count > 1.popularWordsNumber - maximum number to store, but ties carry on.public java.util.ArrayList<java.lang.String[]> reSortWordSequences(int popularSequencesNumber)
count > 1.popularSequencesNumber - maximum number to store, but ties carry on.public java.lang.String wordsToString(java.util.ArrayList<java.lang.String[]> popularWords)
popularWords - the popular words list.public java.lang.String sequencesToString(java.util.ArrayList<java.util.ArrayList<java.lang.String[]>> popularSequences)
popularSequences - the popular word sequences list.