Class SnowballProgram

    • Field Detail

      • cursor

        protected int cursor
      • limit

        protected int limit
      • limit_backward

        protected int limit_backward
      • bra

        protected int bra
      • ket

        protected int ket
    • Constructor Detail

      • SnowballProgram

        protected SnowballProgram()
    • Method Detail

      • setCurrent

        public void setCurrent​(String value)
        Set the current string.
      • getCurrent

        public String getCurrent()
        Get the current string.
      • setCurrent

        public void setCurrent​(char[] text,
                               int length)
        Set the current string.
        text - character array containing input
        length - valid length of text.
      • getCurrentBuffer

        public char[] getCurrentBuffer()
        Get the current buffer containing the stem.

        NOTE: this may be a reference to a different character array than the one originally provided with setCurrent, in the exceptional case that stemming produced a longer intermediate or result string.

        It is necessary to use getCurrentBufferLength() to determine the valid length of the returned buffer. For example, many words are stemmed simply by subtracting from the length to remove suffixes.

        See Also:
      • getCurrentBufferLength

        public int getCurrentBufferLength()
        Get the valid length of the character array in getCurrentBuffer().
        valid length of the array.
      • in_grouping

        protected boolean in_grouping​(char[] s,
                                      int min,
                                      int max)
      • in_grouping_b

        protected boolean in_grouping_b​(char[] s,
                                        int min,
                                        int max)
      • out_grouping

        protected boolean out_grouping​(char[] s,
                                       int min,
                                       int max)
      • out_grouping_b

        protected boolean out_grouping_b​(char[] s,
                                         int min,
                                         int max)
      • find_among

        protected int find_among​(Among[] v)
      • find_among_b

        protected int find_among_b​(Among[] v)
      • replace_s

        protected int replace_s​(int c_bra,
                                int c_ket,
                                CharSequence s)
      • slice_check

        protected void slice_check()
      • slice_from

        protected void slice_from​(CharSequence s)
      • slice_del

        protected void slice_del()
      • insert

        protected void insert​(int c_bra,
                              int c_ket,
                              CharSequence s)