emolib.eks.anlw
Class DictionaryANLW

java.lang.Object
  extended by emolib.eks.anlw.DictionaryANLW

public class DictionaryANLW
extends java.lang.Object

The DictionaryANLW class provides a dictionary to deal with the emotional dimensions contained in the ANLW database.

Author:
David García, Alexandre Trilla (atrilla@salle.url.edu)

Constructor Summary
DictionaryANLW(java.lang.String path)
          The main constructor of the DictionaryANLW object.
 
Method Summary
 boolean containsEmotionalKey(java.lang.String emotionalKey)
          Function to determine if the input key has a match in the database.
 float[] getDimentionsProducedByAdjective(java.lang.String emotionalKey)
          Retrieves the emotional dimentions for this adjective-based stem.
 float[] getDimentionsProducedByNoun(java.lang.String emotionalKey)
          Retrieves the emotional dimentions for this noun-based stem.
 float[] getDimentionsProducedByVerb(java.lang.String emotionalKey)
          Retrieves the emotional dimentions for this verb-based stem.
 float[] getFirstDimentions(java.lang.String emotionalKey)
          Retrieves the first emotional dimentions for this stem.
 boolean isProducedByAdjective(java.lang.String emotionalKey)
          Checks if the the key has been produced by an adjective.
 boolean isProducedByNoun(java.lang.String emotionalKey)
          Checks if the the key has been produced by a noun.
 boolean isProducedByVerb(java.lang.String emotionalKey)
          Checks if the the key has been produced by a verb.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DictionaryANLW

public DictionaryANLW(java.lang.String path)
The main constructor of the DictionaryANLW object.

Parameters:
path - The path to find the ANLW database.
Method Detail

containsEmotionalKey

public boolean containsEmotionalKey(java.lang.String emotionalKey)
Function to determine if the input key has a match in the database. This function should be called before any other trying to obtain information from the emotional content of the key.

Parameters:
emotionalKey - The emotional key in question.
Returns:
True if the key has a match in the database.

isProducedByNoun

public boolean isProducedByNoun(java.lang.String emotionalKey)
Checks if the the key has been produced by a noun. This function assumes that "containsEmotionalKey" has already returned true.

Parameters:
emotionalKey - The emotional key in question.

getDimentionsProducedByNoun

public float[] getDimentionsProducedByNoun(java.lang.String emotionalKey)
Retrieves the emotional dimentions for this noun-based stem. This function assumes that "isProducedByNoun" has already returned true.

Parameters:
emotionalKey - The emotional key in question.

getFirstDimentions

public float[] getFirstDimentions(java.lang.String emotionalKey)
Retrieves the first emotional dimentions for this stem. This function assumes that conflation has occurred, and thus a "best effort" result is obtained.

Parameters:
emotionalKey - The emotional key in question.

isProducedByVerb

public boolean isProducedByVerb(java.lang.String emotionalKey)
Checks if the the key has been produced by a verb. This function assumes that "containsEmotionalKey" has already returned true.

Parameters:
emotionalKey - The emotional key in question.

getDimentionsProducedByVerb

public float[] getDimentionsProducedByVerb(java.lang.String emotionalKey)
Retrieves the emotional dimentions for this verb-based stem. This function assumes that "isProducedByVerb" has already returned true.

Parameters:
emotionalKey - The emotional key in question.

isProducedByAdjective

public boolean isProducedByAdjective(java.lang.String emotionalKey)
Checks if the the key has been produced by an adjective. This function assumes that "containsEmotionalKey" has already returned true.

Parameters:
emotionalKey - The emotional key in question.

getDimentionsProducedByAdjective

public float[] getDimentionsProducedByAdjective(java.lang.String emotionalKey)
Retrieves the emotional dimentions for this adjective-based stem. This function assumes that "isProducedByAdjective" has already returned true.

Parameters:
emotionalKey - The emotional key in question.