C# Class Lucene.Net.Analysis.Hunspell.HunspellDictionary

Datei anzeigen Open project: sisve/Lucene.Net.Analysis.Hunspell Class Usage Examples

Public Methods

Method Description
HunspellDictionary ( Stream affix, IEnumerable dictionaries ) : System

Creates a new HunspellDictionary containing the information read from the provided streams to hunspell affix and dictionary files.

HunspellDictionary ( Stream affix, Stream dictionary ) : System

Creates a new HunspellDictionary containing the information read from the provided streams to hunspell affix and dictionary file.

LookupPrefix ( char word, int offset, int length ) : IEnumerable

Looks up HunspellAffix prefixes that have an append that matches the String created from the given char array, offset and length.

LookupSuffix ( char word, int offset, int length ) : IEnumerable

Looks up HunspellAffix suffixes that have an append that matches the String created from the given char array, offset and length.

LookupWord ( String word ) : IEnumerable

Looks up HunspellWords that match the String created from the given char array, offset and length.

Private Methods

Method Description
GetFlagParsingStrategy ( String flagLine ) : FlagParsingStrategy

Determines the appropriate {@link FlagParsingStrategy} based on the FLAG definiton line taken from the affix file.

ParseAffix ( Dictionary affixes, String header, TextReader reader, String conditionPattern ) : void

Parses a specific affix rule putting the result into the provided affix map.

ParseAliasFlag ( String line, TextReader reader ) : void

Parse alias flag and put it in hash

ReadAffixFile ( Stream affixStream, Encoding encoding ) : void

Reads the affix file through the provided Stream, building up the prefix and suffix maps.

ReadDictionaryEncoding ( Stream affix ) : String

Parses the encoding specificed in the affix file readable through the provided Stream.

ReadDictionaryFile ( Stream dictionary, Encoding encoding ) : void

Reads the dictionary file through the provided Stream, building up the words map.

Method Details

HunspellDictionary() public method

Creates a new HunspellDictionary containing the information read from the provided streams to hunspell affix and dictionary files.
Can be thrown while reading from the streams. Can be thrown if the content of the files does not meet expected formats.
public HunspellDictionary ( Stream affix, IEnumerable dictionaries ) : System
affix Stream Stream for reading the hunspell affix file.
dictionaries IEnumerable Streams for reading the hunspell dictionary file.
return System

HunspellDictionary() public method

Creates a new HunspellDictionary containing the information read from the provided streams to hunspell affix and dictionary file.
Can be thrown while reading from the streams. Can be thrown if the content of the files does not meet expected formats.
public HunspellDictionary ( Stream affix, Stream dictionary ) : System
affix Stream Stream for reading the hunspell affix file.
dictionary Stream Stream for reading the hunspell dictionary file.
return System

LookupPrefix() public method

Looks up HunspellAffix prefixes that have an append that matches the String created from the given char array, offset and length.
public LookupPrefix ( char word, int offset, int length ) : IEnumerable
word char Char array to generate the String from.
offset int Offset in the char array that the String starts at.
length int Length from the offset that the String is.
return IEnumerable

LookupSuffix() public method

Looks up HunspellAffix suffixes that have an append that matches the String created from the given char array, offset and length.
public LookupSuffix ( char word, int offset, int length ) : IEnumerable
word char Char array to generate the String from.
offset int Offset in the char array that the String starts at.
length int Length from the offset that the String is.
return IEnumerable

LookupWord() public method

Looks up HunspellWords that match the String created from the given char array, offset and length.
public LookupWord ( String word ) : IEnumerable
word String
return IEnumerable