public class HunspellDictionary extends Object
Constructor and Description |
---|
HunspellDictionary(InputStream affix,
InputStream dictionary,
Version version)
Creates a new HunspellDictionary containing the information read from the provided InputStreams to hunspell affix
and dictionary files.
|
HunspellDictionary(InputStream affix,
InputStream dictionary,
Version version,
boolean ignoreCase)
Creates a new HunspellDictionary containing the information read from the provided InputStreams to hunspell affix
and dictionary files.
|
HunspellDictionary(InputStream affix,
List<InputStream> dictionaries,
Version version,
boolean ignoreCase)
Creates a new HunspellDictionary containing the information read from the provided InputStreams to hunspell affix
and dictionary files.
|
Modifier and Type | Method and Description |
---|---|
Version |
getVersion() |
boolean |
isIgnoreCase() |
List<HunspellAffix> |
lookupPrefix(char[] word,
int offset,
int length)
Looks up HunspellAffix prefixes that have an append that matches the String created from the given char array, offset and length
|
List<HunspellAffix> |
lookupSuffix(char[] word,
int offset,
int length)
Looks up HunspellAffix suffixes that have an append that matches the String created from the given char array, offset and length
|
List<HunspellWord> |
lookupWord(char[] word,
int offset,
int length)
Looks up HunspellWords that match the String created from the given char array, offset and length
|
public HunspellDictionary(InputStream affix, InputStream dictionary, Version version) throws IOException, ParseException
affix
- InputStream for reading the hunspell affix file (won't be closed).dictionary
- InputStream for reading the hunspell dictionary file (won't be closed).version
- Lucene VersionIOException
- Can be thrown while reading from the InputStreamsParseException
- Can be thrown if the content of the files does not meet expected formatspublic HunspellDictionary(InputStream affix, InputStream dictionary, Version version, boolean ignoreCase) throws IOException, ParseException
affix
- InputStream for reading the hunspell affix file (won't be closed).dictionary
- InputStream for reading the hunspell dictionary file (won't be closed).version
- Lucene VersionignoreCase
- If true, dictionary matching will be case insensitiveIOException
- Can be thrown while reading from the InputStreamsParseException
- Can be thrown if the content of the files does not meet expected formatspublic HunspellDictionary(InputStream affix, List<InputStream> dictionaries, Version version, boolean ignoreCase) throws IOException, ParseException
affix
- InputStream for reading the hunspell affix file (won't be closed).dictionaries
- InputStreams for reading the hunspell dictionary file (won't be closed).version
- Lucene VersionignoreCase
- If true, dictionary matching will be case insensitiveIOException
- Can be thrown while reading from the InputStreamsParseException
- Can be thrown if the content of the files does not meet expected formatspublic List<HunspellWord> lookupWord(char[] word, int offset, int length)
word
- Char array to generate the String fromoffset
- Offset in the char array that the String starts atlength
- Length from the offset that the String isnull
if none are foundpublic List<HunspellAffix> lookupPrefix(char[] word, int offset, int length)
word
- Char array to generate the String fromoffset
- Offset in the char array that the String starts atlength
- Length from the offset that the String isnull
if none are foundpublic List<HunspellAffix> lookupSuffix(char[] word, int offset, int length)
word
- Char array to generate the String fromoffset
- Offset in the char array that the String starts atlength
- Length from the offset that the String isnull
if none are foundpublic Version getVersion()
public boolean isIgnoreCase()