Class RakeParams


  • public class RakeParams
    extends Object
    A parameter object for RAKE settings.
    • Constructor Detail

      • RakeParams

        public RakeParams​(String[] stopWords,
                          String[] stopPOS,
                          int wordMinChar,
                          boolean stem,
                          String phraseDelims,
                          opennlp.tools.stemmer.snowball.SnowballStemmer.ALGORITHM stemmerLang)
        Constructor.
        Parameters:
        stopWords - an array of stopwords, which will be treated like phrase delimiters when RAKE is identifying candidate keywords
        stopPOS - an array of part-of-speech (POS) tags that should be considered stopwords. Words that are tagged with any of the parts-of-speech listed in stopPOS will be treated like delimiters. See Part-Of-Speech Tagging with R for a list of acceptable POS tags and their meanings.
        wordMinChar - the minimum number of characters that a token/word must have. Words below this threshold are treated like phrase delimiters.
        stem - an indicator for whether you want to stem the tokens in each keyword
        phraseDelims - a character set containing the punctuation characters used to identify phrases
        stemmerLang - the stemming language/algorithm that should be used
      • RakeParams

        public RakeParams​(String[] stopWords,
                          String[] stopPOS,
                          int wordMinChar,
                          boolean stem,
                          String phraseDelims)
        Constructor. This version of RakeParams exists to maintain backward compatibility of the overall API of the package...The stemmerLang param had to be added to an overloaded version of this method b/c of https://github.com/crew102/rapidrake-java/issues/4, hence the funky API.
        See Also:
        RakeParams(String[], String[], int, boolean, String, SnowballStemmer.ALGORITHM)
    • Method Detail

      • getStopWords

        public List<String> getStopWords()
      • getWordMinChar

        public int getWordMinChar()
      • shouldStem

        public boolean shouldStem()
      • getPhraseDelims

        public String getPhraseDelims()
      • getStemmerLang

        public opennlp.tools.stemmer.snowball.SnowballStemmer.ALGORITHM getStemmerLang()