synesketch.emotion.util
Class LexicalUtility

java.lang.Object
  extended by synesketch.emotion.util.LexicalUtility

public class LexicalUtility
extends java.lang.Object

Utility class for some text processing alghoritms

Version:
1.0
Author:
Uros Krcadinac email: uros@krcadinac.com

Method Summary
 AffectWord getAffectWord(java.lang.String word)
          Returns the instance of AffectWord for the given word.
 java.util.List<AffectWord> getAffectWords()
          Returns all instances of AffectWord
 AffectWord getEmoticonAffectWord(java.lang.String word)
          Returns the instance of AffectWord for the given word, which is emoticon.
 java.util.List<AffectWord> getEmoticonWords(java.lang.String sentence)
          Returns all instances of AffectWord which represent emoticons for the given sentence.
static LexicalUtility getInstance()
          Returns the Singleton instance of the LexicalUtility.
 boolean hasNegation(java.lang.String sentence)
          Returns true if the sentence contains a negation word in it.
 boolean isIntensityModifier(java.lang.String word)
          Returns true if the word is an intensity modifier.
 boolean isNegation(java.lang.String word)
          Returns true if the word is a negation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static LexicalUtility getInstance()
                                  throws java.io.IOException
Returns the Singleton instance of the LexicalUtility.

Returns:
the instance of LexicalUtility
Throws:
java.io.IOException

getAffectWord

public AffectWord getAffectWord(java.lang.String word)
Returns the instance of AffectWord for the given word.

Parameters:
word - String representing the word
Returns:
AffectWord

getEmoticonAffectWord

public AffectWord getEmoticonAffectWord(java.lang.String word)
Returns the instance of AffectWord for the given word, which is emoticon.

Parameters:
word - String representing the word
Returns:
AffectWord

getEmoticonWords

public java.util.List<AffectWord> getEmoticonWords(java.lang.String sentence)
Returns all instances of AffectWord which represent emoticons for the given sentence.

Parameters:
sentence - String representing the sentence
Returns:
the list of AffectWord instances

getAffectWords

public java.util.List<AffectWord> getAffectWords()
Returns all instances of AffectWord

Returns:
the list of AffectWord instances

isNegation

public boolean isNegation(java.lang.String word)
Returns true if the word is a negation.

Parameters:
word - String which represents a word
Returns:
boolean, true is the word is a negation

hasNegation

public boolean hasNegation(java.lang.String sentence)
Returns true if the sentence contains a negation word in it.

Parameters:
sentence - String which represents a sentence
Returns:
boolean, true is the sentence contains negations

isIntensityModifier

public boolean isIntensityModifier(java.lang.String word)
Returns true if the word is an intensity modifier.

Parameters:
word - String which represents a word
Returns:
boolean, true is the word is an intensity modifier