|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.analysis.hunspell.HunspellDictionary
public class HunspellDictionary
In-memory structure for the dictionary (.dic) and affix (.aff) data of a hunspell dictionary.
Constructor Summary | |
---|---|
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 |
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HunspellDictionary(InputStream affix, InputStream dictionary, Version version) throws IOException, ParseException
affix
- InputStream for reading the hunspell affix filedictionary
- InputStream for reading the hunspell dictionary fileversion
- Lucene Version
IOException
- Can be thrown while reading from the InputStreams
ParseException
- 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 filedictionary
- InputStream for reading the hunspell dictionary fileversion
- Lucene VersionignoreCase
- If true, dictionary matching will be case insensitive
IOException
- Can be thrown while reading from the InputStreams
ParseException
- 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 filedictionaries
- InputStreams for reading the hunspell dictionary fileversion
- Lucene VersionignoreCase
- If true, dictionary matching will be case insensitive
IOException
- Can be thrown while reading from the InputStreams
ParseException
- Can be thrown if the content of the files does not meet expected formatsMethod Detail |
---|
public 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 is
null
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 is
null
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 is
null
if none are foundpublic Version getVersion()
public boolean isIgnoreCase()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |