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

Class SimpleClassifier

source code

             object --+    
                      |    
ClassifierI.ClassifierI --+
                          |
                         SimpleClassifier

A wrapper for the CLassifierI.


To Do: Only wraps WekaClassificationStrategy at the moment

Instance Methods [hide private]
 
__init__(self, classification_strategy, list_handlers=[], polarity_type_handled=None)
Constructor
source code
 
_disambiguate_lists_id_polarities(self, list_id_polarities)
Merge list_a and list_b prioritizing values of list_b
source code
 
classify(self, arff_file, results_file, dict_position_instanceid) source code
 
to_key_value_format(self, list_id_category, dest_file)
It transforms the output provided by the classify method into a key-value format (QREL format).
source code

Inherited from ClassifierI.ClassifierI: classify_from_info

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

Class Variables [hide private]
  MAX_JOINT_FILES = 30000
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, classification_strategy, list_handlers=[], polarity_type_handled=None)
(Constructor)

source code 

Constructor

Parameters:
Overrides: object.__init__

_disambiguate_lists_id_polarities(self, list_id_polarities)

source code 

Merge list_a and list_b prioritizing values of list_b

Parameters:

classify(self, arff_file, results_file, dict_position_instanceid)

source code 
Parameters:
  • arff_file - A string. The path to the ARFF file to be classified
  • results_file - A string. The path where will be printed the WEKA classifications.
Overrides: ClassifierI.ClassifierI.classify

to_key_value_format(self, list_id_category, dest_file)

source code 

It transforms the output provided by the classify method into a key-value format (QREL format).

Parameters:
  • dest_file - A string. The