Class Keyword


  • public class Keyword
    extends Object
    An n-gram that doesn't contain stop words or phrase delimiters.
    • Constructor Detail

      • Keyword

        public Keyword​(String keyString,
                       String[] keyStringAry,
                       String keyStemmedString,
                       String[] keyStemmedStringAry)
        Constructor.
        Parameters:
        keyString - the full form (i.e., not tokenized) of the keyword (e.g., "good dogs")
        keyStringAry - the tokenized version of the keyword (e.g., {"good", "dogs"})
        keyStemmedString - the stemmed version of keyString (e.g., "good dogs")
        keyStemmedStringAry - the stemmed version of keyStringAry (e.g., {"good", "dog"})
      • Keyword

        public Keyword​(String keyString,
                       String[] keyStringAry)
    • Method Detail

      • getKeyStringAry

        public String[] getKeyStringAry()
      • getKeyStemmedAry

        public String[] getKeyStemmedAry()
      • getKeyString

        public String getKeyString()
      • getStemmedString

        public String getStemmedString()
      • getScore

        public float getScore()
      • sumScore

        public void sumScore​(Map<String,​Float> scoreVec,
                             RakeParams rakeParams)
        Sum the scores of each token belonging to a given keyword.
        Parameters:
        scoreVec - a document-level collection of key-value pairs, where the keys are the distinct tokens across all keywords and the values are the document-level scores associated with them
        rakeParams - the parameters that RAKE will use
        See Also:
        RakeParams