Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class 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
    object
    Trie
    MultiTrie
    MultiTrie2
    Inherited Members
    MultiTrie.m_tries
    MultiTrie.PrintInfo(TextWriter, string)
    Trie.GetAll(string)
    Trie.GetCells()
    Trie.GetCellsPnt()
    Trie.GetCellsVal()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Egothor.Stemmer
    Assembly: Lucene.Net.Analysis.Stempel.dll
    Syntax
    public class MultiTrie2 : MultiTrie

    Constructors

    MultiTrie2(IDataInput)

    Constructor for the MultiTrie object.

    Declaration
    public MultiTrie2(IDataInput @is)
    Parameters
    Type Name Description
    IDataInput is

    the input stream

    Exceptions
    Type Condition
    IOException

    if an I/O error occurs

    MultiTrie2(bool)

    Constructor for the MultiTrie2 object

    Declaration
    public MultiTrie2(bool forward)
    Parameters
    Type Name Description
    bool forward

    set to true if the elements should be read left to right

    Methods

    Add(string, string)

    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.

    Declaration
    public override void Add(string key, string cmd)
    Parameters
    Type Name Description
    string key

    the key

    string cmd

    the patch command

    Overrides
    MultiTrie.Add(string, string)

    Decompose(string)

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

    Declaration
    public virtual string[] Decompose(string cmd)
    Parameters
    Type Name Description
    string cmd

    the patch command

    Returns
    Type Description
    string[]

    an array containing the pieces of the command

    GetFully(string)

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

    Declaration
    public override string GetFully(string key)
    Parameters
    Type Name Description
    string key

    the key to the cell holding the desired element

    Returns
    Type Description
    string

    the element

    Overrides
    MultiTrie.GetFully(string)

    GetLastOnPath(string)

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

    Declaration
    public override string GetLastOnPath(string key)
    Parameters
    Type Name Description
    string key

    the key associated with the desired element

    Returns
    Type Description
    string

    the element that is stored as last on a path

    Overrides
    MultiTrie.GetLastOnPath(string)

    Reduce(Reduce)

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

    Declaration
    public override Trie Reduce(Reduce by)
    Parameters
    Type Name Description
    Reduce by

    the Trie to reduce

    Returns
    Type Description
    Trie

    the newly reduced Trie

    Overrides
    MultiTrie.Reduce(Reduce)

    Store(IDataOutput)

    Write this data structure to the given output stream.

    Declaration
    public override void Store(IDataOutput os)
    Parameters
    Type Name Description
    IDataOutput os

    the output stream

    Overrides
    MultiTrie.Store(IDataOutput)
    Exceptions
    Type Condition
    IOException

    if an I/O error occurs

    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.