Class Lift


public class Lift extends Reduce
The Lift class is a data structure that is a variation of a Patricia trie.

Lift's raison d'etre is to implement reduction of the trie via the Lift-Up method., which makes the data structure less liable to overstemming.

  • Nested Class Summary

    Nested classes/interfaces inherited from class org.egothor.stemmer.Reduce

    Reduce.Remap
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) boolean
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Lift(boolean changeSkip)
    Constructor for the Lift object.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    liftUp(Row in, List<Row> nodes)
    Reduce the trie using Lift-Up reduction.
    optimize(Trie orig)
    Optimize (eliminate rows with no content) the given Trie and return the reduced Trie.

    Methods inherited from class org.egothor.stemmer.Reduce

    removeGaps

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • changeSkip

      boolean changeSkip
  • Constructor Details

    • Lift

      public Lift(boolean changeSkip)
      Constructor for the Lift object.
      Parameters:
      changeSkip - when set to true, comparison of two Cells takes a skip command into account
  • Method Details

    • optimize

      public Trie optimize(Trie orig)
      Optimize (eliminate rows with no content) the given Trie and return the reduced Trie.
      Overrides:
      optimize in class Reduce
      Parameters:
      orig - the Trie to optimized
      Returns:
      the reduced Trie
    • liftUp

      public void liftUp(Row in, List<Row> nodes)
      Reduce the trie using Lift-Up reduction.

      The Lift-Up reduction propagates all leaf-values (patch commands), where possible, to higher levels which are closer to the root of the trie.

      Parameters:
      in - the Row to consider when optimizing
      nodes - contains the patch commands