Class ViterbiNBest.Lattice<U extends MorphData>

java.lang.Object
org.apache.lucene.analysis.morph.ViterbiNBest.Lattice<U>
Enclosing class:
ViterbiNBest<T extends Token,U extends MorphData>

protected static final class ViterbiNBest.Lattice<U extends MorphData> extends Object
Yet another lattice data structure for keeping n-best path.
  • Field Details

    • fragment

      private char[] fragment
    • dictionaryMap

      private EnumMap<TokenType,Dictionary<? extends U extends MorphData>> dictionaryMap
    • useEOS

      private boolean useEOS
    • rootCapacity

      private int rootCapacity
    • rootSize

      private int rootSize
    • rootBase

      private int rootBase
    • lRoot

      private int[] lRoot
    • rRoot

      private int[] rRoot
    • capacity

      private int capacity
    • nodeCount

      private int nodeCount
    • nodeDicType

      private TokenType[] nodeDicType
    • nodeWordID

      private int[] nodeWordID
    • nodeMark

      private int[] nodeMark
    • nodeLeftID

      private int[] nodeLeftID
    • nodeRightID

      private int[] nodeRightID
    • nodeWordCost

      private int[] nodeWordCost
    • nodeLeftCost

      private int[] nodeLeftCost
    • nodeRightCost

      private int[] nodeRightCost
    • nodeLeftNode

      private int[] nodeLeftNode
    • nodeRightNode

      private int[] nodeRightNode
    • nodeLeft

      private int[] nodeLeft
    • nodeRight

      private int[] nodeRight
    • nodeLeftChain

      private int[] nodeLeftChain
    • nodeRightChain

      private int[] nodeRightChain
  • Constructor Details

    • Lattice

      protected Lattice()
  • Method Details

    • getNodeLeft

      public int getNodeLeft(int node)
    • getNodeRight

      public int getNodeRight(int node)
    • getNodeDicType

      public TokenType getNodeDicType(int node)
    • getNodeWordID

      public int getNodeWordID(int node)
    • getRootBase

      public int getRootBase()
    • setupRoot

      private void setupRoot(int baseOffset, int lastOffset)
    • reserve

      private void reserve(int n)
    • setupNodePool

      private void setupNodePool(int n)
    • addNode

      private int addNode(TokenType dicType, int wordID, int left, int right)
    • positionCount

      private int positionCount(Viterbi.WrappedPositionArray<ViterbiNBest.PositionNBest> positions, int beg, int end)
    • setup

      void setup(char[] fragment, EnumMap<TokenType,Dictionary<? extends U>> dictionaryMap, Viterbi.WrappedPositionArray<ViterbiNBest.PositionNBest> positions, int prevOffset, int endOffset, boolean useEOS)
    • markUnreachable

      void markUnreachable()
    • connectionCost

      private int connectionCost(ConnectionCosts costs, int left, int right)
    • calcLeftCost

      void calcLeftCost(ConnectionCosts costs)
    • calcRightCost

      void calcRightCost(ConnectionCosts costs)
    • markSameSpanNode

      void markSameSpanNode(int refNode, int value)
    • bestPathNodeList

      IntArrayList bestPathNodeList()
    • cost

      private int cost(int node)
    • nBestNodeList

      IntArrayList nBestNodeList(int N)
    • bestCost

      int bestCost()
    • probeDelta

      int probeDelta(int start, int end)
    • debugPrint

      void debugPrint()