Class LSTMBreakEngine

    • Method Detail

      • make2DArray

        private static float[][] make2DArray​(int[] data,
                                             int start,
                                             int d1,
                                             int d2)
      • make1DArray

        private static float[] make1DArray​(int[] data,
                                           int start,
                                           int d1)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • addDotProductTo

        private static void addDotProductTo​(float[] a,
                                            float[][] b,
                                            float[] result)
      • addTo

        private static void addTo​(float[] a,
                                  float[] result)
      • hadamardProductTo

        private static void hadamardProductTo​(float[] a,
                                              float[] result)
      • addHadamardProductTo

        private static void addHadamardProductTo​(float[] a,
                                                 float[] b,
                                                 float[] result)
      • sigmoid

        private static void sigmoid​(float[] result,
                                    int start,
                                    int length)
      • tanh

        private static void tanh​(float[] result,
                                 int start,
                                 int length)
      • maxIndex

        private static int maxIndex​(float[] data)
      • compute

        private float[] compute​(float[][] W,
                                float[][] U,
                                float[] B,
                                float[] x,
                                float[] h,
                                float[] c)
      • divideUpDictionaryRange

        public int divideUpDictionaryRange​(java.text.CharacterIterator fIter,
                                           int rangeStart,
                                           int rangeEnd,
                                           DictionaryBreakEngine.DequeI foundBreaks,
                                           boolean isPhraseBreaking)
        Description copied from class: DictionaryBreakEngine

        Divide up a range of known dictionary characters handled by this break engine.

        Specified by:
        divideUpDictionaryRange in class DictionaryBreakEngine
        Parameters:
        fIter - A UText representing the text
        rangeStart - The start of the range of dictionary characters
        rangeEnd - The end of the range of dictionary characters
        foundBreaks - Output of break positions. Positions are pushed. Pre-existing contents of the output stack are unaltered.
        Returns:
        The number of breaks found
      • defaultLSTM

        private static java.lang.String defaultLSTM​(int script)