Package miopia :: Package classifier :: Module QuaternaryStrategy :: Class QuaternaryStrategy
[hide private]
[frames] | no frames]

Class QuaternaryStrategy

source code

                                   object --+    
                                            |    
ClassificationStrategy.ClassificationStrategy --+
                                                |
                                               QuaternaryStrategy

This strategy allows to classify texts such as Positive, Negative Neutral (the text merges positive and negative ideas) or None (without any sentiment)

Instance Methods [hide private]
 
__init__(self, threshold)
Constructor
source code
 
_type(self, sentiment_info)
Returns: A PolarityType value in {NEGATIVE, POSITIVE, NEUTRAL, NONE}
source code

Inherited from ClassificationStrategy.ClassificationStrategy: polarity, polarity_info

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, threshold)
(Constructor)

source code 

Constructor

Parameters:
  • threshold - A float. It establish a numerical threshold to distinguish between classes
Overrides: object.__init__

_type(self, sentiment_info)

source code 
Parameters:
Returns:
A PolarityType value in {NEGATIVE, POSITIVE, NEUTRAL, NONE}
Overrides: ClassificationStrategy.ClassificationStrategy._type