emolib.classifier
Class FeatureBox

java.lang.Object
  extended by emolib.classifier.FeatureBox

public class FeatureBox
extends java.lang.Object

The FeatureBox class defines the data container that must be used to interact with the classifiers.

This container just keeps the features that are relevant for emotional prediction, along with the textual elements used to produce such features. Since the many classifiers deal with different kinds of features and the training corpora used to extract the knowledge provide complementary data, this class is useful to deal with these situations and enables the classifiers to behave in a standardised manner.

Author:
Alexandre Trilla (atrilla@salle.url.edu)

Constructor Summary
FeatureBox()
          Main constructor.
FeatureBox(java.lang.String givenText)
          Constructor with text.
 
Method Summary
 boolean containsEmotionalDimensions()
          Method to set if this FeatureBox contains emotional dimensions.
 boolean containsSynonyms()
          Function to check if this FeatureBox contains any synonyms.
 float getActivation()
          Function to retrieve the activation value of this FeatureBox.
 float getControl()
          Function to retrieve the control value of this FeatureBox.
 boolean getNegation()
          Function to retrieve the negation.
 int getNumberOfEmotionalDimensions()
          Function to retrieve the number of emotional dimensions that this FeatureBox object contains.
 java.lang.String getPOSTags()
          Function to retrieve the POS tags.
 java.lang.String getStemmedSynonyms()
          Function to retrieve the stemmed synonyms of the words.
 java.lang.String getStems()
          Function to retrieve the stems of the words.
 java.lang.String getSynonyms()
          Function to retrieve the synonyms of the words.
 java.lang.String getText()
          Function to retrieve the text.
 float getValence()
          Function to retrieve the valence value of this FeatureBox.
 java.lang.String getWords()
          Function to retrieve the words.
 void setActivation(float activation)
          Method to introduce the activation emotional dimension into this container.
 void setControl(float control)
          Method to introduce the control emotional dimension into this container.
 void setNegation(boolean neg)
          Method to input the negation feature of the words above..
 void setNumberOfEmotionalDimensions(int numberOfDimensions)
          Method to set the number of emotional dimensions.
 void setPOSTags(java.lang.String tags)
          Method to input the POS tags.
 void setStemmedSynonyms(java.lang.String ssyns)
          Method to input the stemmed synonyms of the words (nouns, actually).
 void setStems(java.lang.String stems)
          Method to input the stems of the words.
 void setSynonyms(java.lang.String syns)
          Method to input the synonyms of the words (nouns, actually).
 void setText(java.lang.String input)
          Method to input text.
 void setValence(float valence)
          Method to introduce the valence emotional dimension into this container.
 void setWords(java.lang.String words)
          Method to input words.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeatureBox

public FeatureBox()
Main constructor.


FeatureBox

public FeatureBox(java.lang.String givenText)
Constructor with text.

Method Detail

setText

public void setText(java.lang.String input)
Method to input text. This text should separate words and punctuation marks with spaces.

Parameters:
input - The text to input.

getText

public java.lang.String getText()
Function to retrieve the text.

Returns:
The text of this feature box.

setWords

public void setWords(java.lang.String words)
Method to input words. This text should separate words and punctuation marks with spaces. This method is in concordance with the POS tags, stems, etc., but not with the text.

Parameters:
words - The words to input.

getWords

public java.lang.String getWords()
Function to retrieve the words.

Returns:
The words of this feature box.

setPOSTags

public void setPOSTags(java.lang.String tags)
Method to input the POS tags.

Parameters:
tags - The POS tags to input.

getPOSTags

public java.lang.String getPOSTags()
Function to retrieve the POS tags.

Returns:
The POS tags of this feature box.

setStems

public void setStems(java.lang.String stems)
Method to input the stems of the words.

Parameters:
stems - The stems to input.

getStems

public java.lang.String getStems()
Function to retrieve the stems of the words.

Returns:
The stems of this feature box.

setSynonyms

public void setSynonyms(java.lang.String syns)
Method to input the synonyms of the words (nouns, actually).

Parameters:
syns - The synonyms to input.

containsSynonyms

public boolean containsSynonyms()
Function to check if this FeatureBox contains any synonyms.

Returns:
True if it contains any synonyms.

getSynonyms

public java.lang.String getSynonyms()
Function to retrieve the synonyms of the words.

Returns:
The synonyms of this feature box.

setStemmedSynonyms

public void setStemmedSynonyms(java.lang.String ssyns)
Method to input the stemmed synonyms of the words (nouns, actually).

Parameters:
ssyns - The stemmed synonyms to input.

getStemmedSynonyms

public java.lang.String getStemmedSynonyms()
Function to retrieve the stemmed synonyms of the words.

Returns:
The stemmed synonyms of this feature box.

setNegation

public void setNegation(boolean neg)
Method to input the negation feature of the words above..

Parameters:
neg - The negation to input.

getNegation

public boolean getNegation()
Function to retrieve the negation.

Returns:
The negation aspect of this feature box.

containsEmotionalDimensions

public boolean containsEmotionalDimensions()
Method to set if this FeatureBox contains emotional dimensions.

Returns:
True if this FeatureBox contains emotional dimensions.

setNumberOfEmotionalDimensions

public void setNumberOfEmotionalDimensions(int numberOfDimensions)
Method to set the number of emotional dimensions. This method should be called before introducing any dimension into this container. Otherwise the system will complain by issuing a warning message.

Parameters:
numberOfDimensions - The number of dimensions.

getNumberOfEmotionalDimensions

public int getNumberOfEmotionalDimensions()
Function to retrieve the number of emotional dimensions that this FeatureBox object contains.

Returns:
The number of emotional dimensions.

setValence

public void setValence(float valence)
Method to introduce the valence emotional dimension into this container. The valence stands the first emotional dimension.

Parameters:
valence - The valence value.

getValence

public float getValence()
Function to retrieve the valence value of this FeatureBox.

Returns:
The valence value.

setActivation

public void setActivation(float activation)
Method to introduce the activation emotional dimension into this container. The activation stands the second emotional dimension.

Parameters:
activation - The activation value.

getActivation

public float getActivation()
Function to retrieve the activation value of this FeatureBox.

Returns:
The activation value.

setControl

public void setControl(float control)
Method to introduce the control emotional dimension into this container. The control stands the third emotional dimension.

Parameters:
control - The control value.

getControl

public float getControl()
Function to retrieve the control value of this FeatureBox.

Returns:
The control value.