Package miopia :: Package preprocessor :: Module EmoticonPreProcessor :: Class EmoticonPreProcessor
[hide private]
[frames] | no frames]

Class EmoticonPreProcessor

source code

                             object --+        
                                      |        
            PreProcessorI.PreProcessorI --+    
                                          |    
PreProcessorDecorator.PreProcessorDecorator --+
                                              |
                                             EmoticonPreProcessor

classdocs

Instance Methods [hide private]
 
__init__(self, component, emoticon_dict=None)
Constructor
source code
 
_get_emoticon_dict(self, name_of_dict, coding='utf-8')
Returns: A dictionary {word,semantic orientation value}
source code
 
preprocess(self, text)
Preprocess emoticons and call preprocess component function
source code
 
_emoticon_transformation(self, text)
Returns: A processed text where emoticons has been processed
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, component, emoticon_dict=None)
(Constructor)

source code 

Constructor

Overrides: object.__init__

_get_emoticon_dict(self, name_of_dict, coding='utf-8')

source code 
Parameters:
  • name_of_dict - The path to a semantic orientiation diccionary
Returns:
A dictionary {word,semantic orientation value}

preprocess(self, text)

source code 

Preprocess emoticons and call preprocess component function

Parameters:
  • text - A String
Overrides: PreProcessorI.PreProcessorI.preprocess

_emoticon_transformation(self, text)

source code 
Parameters:
  • text - A String
Returns:
A processed text where emoticons has been processed