public class HunspellDictionary
extends java.lang.Object
Constructor and Description |
---|
HunspellDictionary(java.io.InputStream affix,
java.io.InputStream dictionary,
org.apache.lucene.util.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,
org.apache.lucene.util.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,
org.apache.lucene.util.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 |
---|---|
org.apache.lucene.util.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, org.apache.lucene.util.Version version) throws java.io.IOException, java.text.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 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, org.apache.lucene.util.Version version, boolean ignoreCase) throws java.io.IOException, java.text.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 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, org.apache.lucene.util.Version version, boolean ignoreCase) throws java.io.IOException, java.text.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 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 org.apache.lucene.util.Version getVersion()
public boolean isIgnoreCase()
Copyright © 2000-2024 Apache Software Foundation. All Rights Reserved.