Class AbstractSnowballTermProcessor

    • Field Detail

      • array

        protected char[] array
      • cursor

        protected int cursor
      • limit

        protected int limit
      • limit_backward

        protected int limit_backward
      • bra

        protected int bra
      • ket

        protected int ket
    • Constructor Detail

      • AbstractSnowballTermProcessor

        public AbstractSnowballTermProcessor()
    • Method Detail

      • stem

        protected abstract boolean stem()
      • processTerm

        public boolean processTerm​(MutableString term)
        Description copied from interface: TermProcessor
        Processes the given term, leaving the result in the same mutable string.
        Specified by:
        processTerm in interface TermProcessor
        Parameters:
        term - a mutable string containing the term to be processed, or null.
        Returns:
        true if the term is not null and should be indexed, false otherwise.
      • processPrefix

        public boolean processPrefix​(MutableString prefix)
        Description copied from interface: TermProcessor
        Processes the given prefix, leaving the result in the same mutable string.

        This method is not used during the indexing phase, but rather at query time. If the user wants to specify a prefix query, it is sometimes necessary to transform the prefix (e.g., DowncaseTermProcessor.processPrefix(MutableString) downcasing it).

        It is of course unlikely that this method returns false, as it is usually not possible to foresee which are the prefixes of indexable words. In case no natural transformation applies, this method should leave its argument unchanged.

        Specified by:
        processPrefix in interface TermProcessor
        Parameters:
        prefix - a mutable string containing a prefix to be processed, or null.
        Returns:
        true if the prefix is not null and there might be an indexed word starting with prefix, false otherwise.
      • 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)
      • in_range

        protected boolean in_range​(int min,
                                   int max)
      • in_range_b

        protected boolean in_range_b​(int min,
                                     int max)
      • out_range

        protected boolean out_range​(int min,
                                    int max)
      • out_range_b

        protected boolean out_range_b​(int min,
                                      int max)
      • eq_s

        protected boolean eq_s​(int s_size,
                               String s)
      • eq_s_b

        protected boolean eq_s_b​(int s_size,
                                 String s)
      • find_among

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

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

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

        protected void slice_check()
      • slice_from

        protected void slice_from​(String s)
      • slice_del

        protected void slice_del()
      • insert

        protected void insert​(int c_bra,
                              int c_ket,
                              String s)
      • insert

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