public class HunspellDictionary
extends java.lang.Object
Constructor and Description |
---|
HunspellDictionary(java.io.InputStream affix,
java.io.InputStream dictionary,
Version version)
Creates a new HunspellDictionary containing the information read from the provided InputStreams to hunspell affix
and dictionary files
|
HunspellDictionary(java.io.InputStream affix,
java.io.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(java.io.InputStream affix,
java.util.List<java.io.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() |
java.util.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
|
java.util.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
|
java.util.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(java.io.InputStream affix, java.io.InputStream dictionary, Version version) throws java.io.IOException, java.text.ParseException
affix
- InputStream for reading the hunspell affix filedictionary
- InputStream for reading the hunspell dictionary fileversion
- Lucene Versionjava.io.IOException
- Can be thrown while reading from the InputStreamsjava.text.ParseException
- Can be thrown if the content of the files does not meet expected formatspublic HunspellDictionary(java.io.InputStream affix, java.io.InputStream dictionary, Version version, boolean ignoreCase) throws java.io.IOException, java.text.ParseException
affix
- InputStream for reading the hunspell affix filedictionary
- InputStream for reading the hunspell dictionary fileversion
- Lucene VersionignoreCase
- If true, dictionary matching will be case insensitivejava.io.IOException
- Can be thrown while reading from the InputStreamsjava.text.ParseException
- Can be thrown if the content of the files does not meet expected formatspublic HunspellDictionary(java.io.InputStream affix, java.util.List<java.io.InputStream> dictionaries, Version version, boolean ignoreCase) throws java.io.IOException, java.text.ParseException
affix
- InputStream for reading the hunspell affix filedictionaries
- InputStreams for reading the hunspell dictionary fileversion
- Lucene VersionignoreCase
- If true, dictionary matching will be case insensitivejava.io.IOException
- Can be thrown while reading from the InputStreamsjava.text.ParseException
- Can be thrown if the content of the files does not meet expected formatspublic java.util.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 java.util.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 java.util.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()