C# Class Egothor.Stemmer.MultiTrie2

The MultiTrie is a Trie of Tries.

It stores words and their associated patch commands. The MultiTrie handles patch commands broken into their constituent parts, as a MultiTrie does, but the commands are delimited by the skip command.

Inheritance: MultiTrie
Show file Open project: apache/lucenenet Class Usage Examples

Public Methods

Method Description
Add ( string key, string cmd ) : void

Add an element to this structure consisting of the given key and patch command.

This method will return without executing if the cmd parameter's length is 0.

Decompose ( string cmd ) : string[]

Break the given patch command into its constituent pieces. The pieces are delimited by NOOP commands.

GetFully ( string key ) : string

Return the element that is stored in a cell associated with the given key.

GetLastOnPath ( string key ) : string

Return the element that is stored as last on a path belonging to the given key.

MultiTrie2 ( IDataInput @is ) : Lucene.Net.Support

Constructor for the MultiTrie object.

MultiTrie2 ( bool forward ) : Lucene.Net.Support

Constructor for the MultiTrie2 object

Reduce ( Reduce by ) : Egothor.Stemmer.Trie

Remove empty rows from the given Trie and return the newly reduced Trie.

Store ( IDataOutput os ) : void

Write this data structure to the given output stream.

Private Methods

Method Description
CannotFollow ( char after, char goes ) : bool
DashEven ( string @in, int from ) : int
LengthPP ( string cmd ) : int
TrySkip ( string @in, int count, string &result ) : bool

Method Details

Add() public method

Add an element to this structure consisting of the given key and patch command.

This method will return without executing if the cmd parameter's length is 0.

public Add ( string key, string cmd ) : void
key string the key
cmd string the patch command
return void

Decompose() public method

Break the given patch command into its constituent pieces. The pieces are delimited by NOOP commands.
public Decompose ( string cmd ) : string[]
cmd string the patch command
return string[]

GetFully() public method

Return the element that is stored in a cell associated with the given key.
public GetFully ( string key ) : string
key string the key to the cell holding the desired element
return string

GetLastOnPath() public method

Return the element that is stored as last on a path belonging to the given key.
public GetLastOnPath ( string key ) : string
key string the key associated with the desired element
return string

MultiTrie2() public method

Constructor for the MultiTrie object.
if an I/O error occurs
public MultiTrie2 ( IDataInput @is ) : Lucene.Net.Support
@is IDataInput
return Lucene.Net.Support

MultiTrie2() public method

Constructor for the MultiTrie2 object
public MultiTrie2 ( bool forward ) : Lucene.Net.Support
forward bool set to true if the elements should be read left to right
return Lucene.Net.Support

Reduce() public method

Remove empty rows from the given Trie and return the newly reduced Trie.
public Reduce ( Reduce by ) : Egothor.Stemmer.Trie
by Reduce the to reduce
return Egothor.Stemmer.Trie

Store() public method

Write this data structure to the given output stream.
if an I/O error occurs
public Store ( IDataOutput os ) : void
os IDataOutput the output stream
return void