Class HunspellStemmer.Stem

  • Enclosing class:
    HunspellStemmer

    public static class HunspellStemmer.Stem
    extends java.lang.Object
    Stem represents all information known about a stem of a word. This includes the stem, and the prefixes and suffixes that were used to change the word into the stem.
    • Constructor Summary

      Constructors 
      Constructor Description
      Stem​(char[] stem, int stemLength)
      Creates a new Stem wrapping the given word stem
    • Constructor Detail

      • Stem

        public Stem​(char[] stem,
                    int stemLength)
        Creates a new Stem wrapping the given word stem
        Parameters:
        stem - Stem of a word
    • Method Detail

      • addPrefix

        public void addPrefix​(HunspellAffix prefix)
        Adds a prefix to the list of prefixes used to generate this stem. Because it is assumed that prefixes are added depth first, the prefix is added to the front of the list
        Parameters:
        prefix - Prefix to add to the list of prefixes for this stem
      • addSuffix

        public void addSuffix​(HunspellAffix suffix)
        Adds a suffix to the list of suffixes used to generate this stem. Because it is assumed that suffixes are added depth first, the suffix is added to the end of the list
        Parameters:
        suffix - Suffix to add to the list of suffixes for this stem
      • getPrefixes

        public java.util.List<HunspellAffix> getPrefixes()
        Returns the list of prefixes used to generate the stem
        Returns:
        List of prefixes used to generate the stem or an empty list if no prefixes were required
      • getSuffixes

        public java.util.List<HunspellAffix> getSuffixes()
        Returns the list of suffixes used to generate the stem
        Returns:
        List of suffixes used to generate the stem or an empty list if no suffixes were required
      • getStem

        public char[] getStem()
        Returns the actual word stem itself
        Returns:
        Word stem itself
      • getStemLength

        public int getStemLength()
        Returns:
        the stemLength
      • getStemString

        public java.lang.String getStemString()