public class SpellingCorrector extends DictionaryBase
Represents a spelling corrector for terms in query.
Modifier and Type | Method and Description |
---|---|
void |
addRange(Iterable<String> words)
Adds the specified collection of words to this instance of the
SpellingCorrector . |
void |
clear()
Removes all words from a
SpellingCorrector object. |
void |
exportDictionary(String fileName)
Exports the internal dictionary to the specified text file.
|
int |
getCount()
Gets the number of words contained in the
SpellingCorrector . |
String[] |
getWords()
Gets the word collection that is contained in a corrector.
|
void |
importDictionary(String fileName)
Imports a dictionary from the specified text file.
|
public final int getCount()
Gets the number of words contained in the SpellingCorrector
.
public final String[] getWords()
Gets the word collection that is contained in a corrector.
public final void addRange(Iterable<String> words)
Adds the specified collection of words to this instance of the SpellingCorrector
.
words
- The collection of words to add to the dictionary.com.aspose.ms.System.ArgumentNullException
- Thrown when words
is null
.public final void clear()
Removes all words from a SpellingCorrector
object.
public final void exportDictionary(String fileName)
Exports the internal dictionary to the specified text file.
fileName
- The file to export to.public final void importDictionary(String fileName)
Imports a dictionary from the specified text file.
fileName
- The file to import from.Copyright © 2019. All rights reserved.