|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttml.vectorspace.operations.AbstractOperation<ReadabilityResult>
tml.vectorspace.operations.Readability
public class Readability
This operation a calculation of readability measurements
Constructor Summary | |
---|---|
Readability()
|
Method Summary | |
---|---|
double |
calculateDifferent(double number1,
double number2)
Calculate the difference between readability indices of 2 paragraphs a absolute value is return because we are only interested in the difference not comparing between the two paragraphs |
double |
calculateGradeLevel(double numberOfWord,
double numberOfSentence,
double numberOfSyllable)
Calculate Flesch Kincaid Grade Level from number of words, number of sentence and number of syllable given This uses the standard Flesch Kincaid Grade Level formula |
double |
calculateReadingEase(double numberOfWord,
double numberOfSentence,
double numberOfSyllable)
Calculate Flesch Reading Ease from number of words, number of sentence and number of syllable given This uses the standard Flesch Reading Ease formula |
double |
countSyllable(java.lang.String input)
Count number of syllable per word input using the rules provided |
void |
differentiate(java.util.ArrayList<ReadabilityResult> results)
Calculate the difference between readability indices of 2 consecutive paragraphs |
boolean |
isVowel(char input)
Check if the string (char input) is a vowel e.g a,e,i,o,u and y (y is treated as a vowel also) |
boolean |
isWord(java.lang.String word)
Check if a string is a word |
void |
start()
Start the operation (non-Javadoc) |
Methods inherited from class tml.vectorspace.operations.AbstractOperation |
---|
addOperationListener, getBackgroundKnowledgeCorpus, getCorpus, getMaxResults, getName, getRepository, getResults, getResultsCSVString, getResultsNumber, getResultsString, getResultsStringTable, getResultsTable, getResultsTableHeader, getResultsXML, getTimeElapsed, printResults, printResultsCSV, printResultsMatlab, removeOperationListener, setBackgroundKnowledgeCorpus, setCorpus, setMaxResults, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Readability()
Method Detail |
---|
public boolean isWord(java.lang.String word)
word
-
public boolean isVowel(char input)
input
- a character
public double countSyllable(java.lang.String input)
input
- text to count syllables from
public double calculateGradeLevel(double numberOfWord, double numberOfSentence, double numberOfSyllable)
numberOfWord
- numberOfSentence
- numberOfSyllable
-
public double calculateReadingEase(double numberOfWord, double numberOfSentence, double numberOfSyllable)
numberOfWord
- numberOfSentence
- numberOfSyllable
-
public double calculateDifferent(double number1, double number2)
number1
- number2
-
public void differentiate(java.util.ArrayList<ReadabilityResult> results)
results
- public void start() throws java.lang.Exception
start
in interface Operation<ReadabilityResult>
start
in class AbstractOperation<ReadabilityResult>
java.lang.Exception
AbstractOperation.start()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |