|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectpt.tumba.spell.Aspell
public final class Aspell
This is a wrapper around the command aspell (version .33.7.1-alpha) with its output reformated so that it can be compared with that of JaSpell.
| Field Summary | |
|---|---|
private java.io.BufferedReader |
aspellErrorStream
The standard error for the aspell command. |
private java.io.PrintStream |
aspellInputStream
The standard input for the aspell command. |
private java.io.BufferedReader |
aspellOutputStream
The standard output for the aspell command. |
private java.lang.Process |
process
The process running the aspell command. |
| Constructor Summary | |
|---|---|
Aspell()
Sole constructor for aspell. |
|
| Method Summary | |
|---|---|
void |
cleanup()
Cleanup the process running aspell. |
private java.lang.String[] |
convertFromAspell(java.lang.String pTerm,
java.lang.String pSuggestions)
Converts the result from the aspell spelling checker into a String array with the possible suggestions. |
java.lang.String[] |
find(java.lang.String pTerm)
Find spelling corrections for a given misspelled word. |
java.lang.String |
findMostSimilar(java.lang.String pTerm)
Find the best spelling correction for a given misspelled word. |
java.util.List |
findMostSimilarList(java.lang.String pTerm)
Find spelling corrections for a given misspelled word. |
static void |
main(java.lang.String[] argv)
Main method . |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.lang.Process process
private java.io.BufferedReader aspellOutputStream
private java.io.PrintStream aspellInputStream
private java.io.BufferedReader aspellErrorStream
| Constructor Detail |
|---|
public Aspell()
throws java.io.IOException
java.io.IOException - A problem occured while creating the backgroud process running aspell.| Method Detail |
|---|
public java.lang.String[] find(java.lang.String pTerm)
pTerm - The word to correct.
public java.lang.String findMostSimilar(java.lang.String pTerm)
pTerm - The word to correct.
public java.util.List findMostSimilarList(java.lang.String pTerm)
pTerm - The word to correct.
List with the possible corrections.public void cleanup()
private java.lang.String[] convertFromAspell(java.lang.String pTerm,
java.lang.String pSuggestions)
String array with the possible suggestions.
pTerm - The correctly spelled word.pSuggestions - A String with the suggestions in aspell format.
public static void main(java.lang.String[] argv)
throws java.lang.Exception
argv - The command line input, tokenized.
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||