org.keel.services.spellcheck
Interface SpellChecker
- public interface SpellChecker
This interface defines a Spell Checking service
- Version:
- 0.10
- Author:
- Daniel Silva Created on October 26, 2003
| Field Summary |
static java.lang.String |
ROLE
The ROLE name used to acquire the component that implements this service |
| Method Summary |
java.util.Collection |
checkSpelling(java.lang.String word)
Retrieve all possible corrections for a potentially misspelled word using the default dictionary. |
java.util.Map |
checkSpelling(java.lang.StringBuffer buffer)
Retrieve all possible corrections for a set of potentially misspelled words using the default dictionary. |
java.util.Map |
checkSpelling(java.lang.StringBuffer buffer, java.lang.String dictionary)
Retrieve all possible corrections for a potentially misspelled words using the specified dictionary. |
java.util.Collection |
checkSpelling(java.lang.String word, java.lang.String dictionary)
Retrieve all possible corrections for a potentially misspelled word using the specified dictionary. |
ROLE
public static final java.lang.String ROLE
-
The ROLE name used to acquire the component that implements this service
- See Also:
- Constant Field Values
checkSpelling
public java.util.Collection checkSpelling(java.lang.String word)
throws NestedException
-
Retrieve all possible corrections for a potentially misspelled word using the default dictionary.
-
- Parameters:
word - Word to check for spelling
- Returns:
- Collection A list of correct words, or an empty list if the word being checked is spelled correctly
- Throws:
NestedException
checkSpelling
public java.util.Collection checkSpelling(java.lang.String word,
java.lang.String dictionary)
throws NestedException
-
Retrieve all possible corrections for a potentially misspelled word using the specified dictionary.
-
- Parameters:
word - Word to check for spelling
dictionary - Dictionary to use
- Returns:
- Collection A list of correct words, or an empty list if the word being checked is spelled correctly
- Throws:
NestedException
checkSpelling
public java.util.Map checkSpelling(java.lang.StringBuffer buffer)
throws NestedException
-
Retrieve all possible corrections for a set of potentially misspelled words using the default dictionary. The Map retrieved will contain the misspelled word as Map key, and a List of corrections for given word as Map value.
-
- Parameters:
buffer - Words to check for spelling
- Returns:
- Map A mapping of mispelled words and their corrections
- Throws:
NestedException
checkSpelling
public java.util.Map checkSpelling(java.lang.StringBuffer buffer,
java.lang.String dictionary)
throws NestedException
-
Retrieve all possible corrections for a potentially misspelled words using the specified dictionary. The Map retrieved will contain the misspelled word as Map key, and a List of corrections for given word as Map value.
-
- Parameters:
buffer - Words to check for spelling
dictionary - Dictionary to use
- Returns:
- Map A mapping of mispelled words and their corrections
- Throws:
NestedException
Please see keelframework.org for information about new Keel releases.