| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectemolib.util.proc.TextDataProcessor
emolib.eks.EmotionalKeywordSpotter
emolib.eks.anlw.EmotionalKeywordSpotterANLW
public class EmotionalKeywordSpotterANLW
The EmotionalKeywordSpotterANLW class performs the Emotional Keyword Spotting (EKS) process using the Affective Norms Language Words (ANLW) dictionary.
This class accepts a configuration parameter that indicates the absolute path of the location of an ANLW dictionary in the file system of the user's computer. Since these dictionaries have the same structure, the term Language has been introduced to wrap English and Spanish.
ANLW contains 1034 stemmed words evaluated for the three emotional dimensions: valence, activation and control. These evaluations range from 0 to 10 in this work. Also, the words are grammatically labelled in order to disambiguate the cases where conflation occurs. In this case, the weight configuration parameter determines the amount of contribution that, despite the conflation, is allowed in the affect computation.
The dictionary is first loaded into the system to then be used to map the incoming stemmed words to the word stems that contains, thus extracting the emotional dimensions and enabling the rest of the system to compute the general affect being expressed. If the stemmed words matched correspond to synonyms of the original word, then a weighting parameter is allowed through the configuration file.
If for the word in question, despite having emotional content, no appropriate emotional dimensions are found, then a default neutral value is assigned to each of the dimensions. This value corresponds to a parameter available through the configuration file.
| Field Summary | |
|---|---|
| static java.lang.String | PROP_CONFLATION_WEIGHT | 
| static java.lang.String | PROP_DICTIONARYThe name of the property indicating the location of the ANLW dictionary. | 
| static java.lang.String | PROP_SYNONYMS_WEIGHT | 
| static java.lang.String | PROP_WORD_NOT_FOUND | 
| Constructor Summary | |
|---|---|
| EmotionalKeywordSpotterANLW()Main constructor of the EmotionalKeywordSpotterANLW. | |
| Method Summary | |
|---|---|
|  void | applyEKS(TextData inputTextDataObject)Method to perform the EKS process. | 
|  void | initialize()Method to initialize the EmotionalKeywordSpotterANLW. | 
|  void | newProperties(PropertySheet ps)This method is called when this configurable component has new data. | 
|  void | register(java.lang.String name,
         Registry registry)Register my properties. | 
| Methods inherited from class emolib.eks.EmotionalKeywordSpotter | 
|---|
| getData | 
| Methods inherited from class emolib.util.proc.TextDataProcessor | 
|---|
| flush, getName, getPredecessor, setPredecessor, toString | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
public static final java.lang.String PROP_DICTIONARY
public static final java.lang.String PROP_CONFLATION_WEIGHT
public static final java.lang.String PROP_SYNONYMS_WEIGHT
public static final java.lang.String PROP_WORD_NOT_FOUND
| Constructor Detail | 
|---|
public EmotionalKeywordSpotterANLW()
| Method Detail | 
|---|
public void register(java.lang.String name,
                     Registry registry)
              throws PropertyException
Configurable
register in interface Configurableregister in class EmotionalKeywordSpottername - the name of the componentregistry - the registry for this component
PropertyException
public void newProperties(PropertySheet ps)
                   throws PropertyException
Configurable
newProperties in interface ConfigurablenewProperties in class EmotionalKeywordSpotterps - a property sheet holding the new data
PropertyException - if there is a problem with the properties.public void initialize()
initialize in interface DataProcessorinitialize in class EmotionalKeywordSpotterpublic void applyEKS(TextData inputTextDataObject)
applyEKS in class EmotionalKeywordSpotterinputTextDataObject - The TextData object to process.| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||