Class Keyword
- java.lang.Object
-
- io.github.crew102.rapidrake.model.Keyword
-
public class Keyword extends Object
An n-gram that doesn't contain stop words or phrase delimiters.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]
getKeyStemmedAry()
String
getKeyString()
String[]
getKeyStringAry()
float
getScore()
String
getStemmedString()
void
sumScore(Map<String,Float> scoreVec, RakeParams rakeParams)
Sum the scores of each token belonging to a given keyword.
-
-
-
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 ofkeyString
(e.g., "good dogs")keyStemmedStringAry
- the stemmed version ofkeyStringAry
(e.g., {"good", "dog"})
-
-
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 themrakeParams
- the parameters that RAKE will use- See Also:
RakeParams
-
-