Class TokenInfoFST


  • public final class TokenInfoFST
    extends java.lang.Object
    Thin wrapper around an FST with root-arc caching for Hangul syllables (11,172 arcs).
    • Field Detail

      • fst

        private final FST<java.lang.Long> fst
      • cacheCeiling

        private final int cacheCeiling
      • rootCache

        private final FST.Arc<java.lang.Long>[] rootCache
      • NO_OUTPUT

        public final java.lang.Long NO_OUTPUT
    • Constructor Detail

      • TokenInfoFST

        public TokenInfoFST​(FST<java.lang.Long> fst)
                     throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • cacheRootArcs

        private FST.Arc<java.lang.Long>[] cacheRootArcs()
                                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • findTargetArc

        public FST.Arc<java.lang.Long> findTargetArc​(int ch,
                                                     FST.Arc<java.lang.Long> follow,
                                                     FST.Arc<java.lang.Long> arc,
                                                     boolean useCache,
                                                     FST.BytesReader fstReader)
                                              throws java.io.IOException
        Throws:
        java.io.IOException
      • getFirstArc

        public FST.Arc<java.lang.Long> getFirstArc​(FST.Arc<java.lang.Long> arc)
      • getInternalFST

        FST<java.lang.Long> getInternalFST()