|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrecognizer.LIWCDictionary
public class LIWCDictionary
Interface to the LIWC dictionary, implementing patterns for each LIWC category based on the LIWC.CAT file.
Constructor Summary | |
---|---|
LIWCDictionary(java.io.File catFile)
Loads dictionary from LIWC dictionary tab-delimited text file (with variable names as first row). |
Method Summary | |
---|---|
java.util.Map<java.lang.String,java.lang.Double> |
getCounts(java.lang.String text,
boolean absoluteCounts)
Returns a map associating each LIWC categories to the number of their occurences in the input text. |
static java.lang.String[] |
splitSentences(java.lang.String text)
Splits a text into sentences separated by a dot, exclamation point or question mark. |
static java.lang.String[] |
tokenize(java.lang.String text)
Splits a text into words separated by non-word characters. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LIWCDictionary(java.io.File catFile)
catFile
- dictionary file, it should be pointing to the LIWC.CAT file of
the Linguistic Inquiry and Word Count software (Pennebaker &
Francis, 2001).Method Detail |
---|
public java.util.Map<java.lang.String,java.lang.Double> getCounts(java.lang.String text, boolean absoluteCounts)
text
- input text.absoluteCounts
- includes counts that aren't relative to the total word
count (e.g. actual word count).
public static java.lang.String[] tokenize(java.lang.String text)
text
- text to tokenize.
public static java.lang.String[] splitSentences(java.lang.String text)
text
- text to tokenize.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |