index
module components.classifier.wrapper
ClassifierWrapper
Python wrapper around the Mallet Classifier
class ClassifierWrapper
Inherits from: object

Wraps the maxent link classifier.

Public Functions

__init__(self, document)
process(self)
Create files with vectors and hand them to the classifier for processing. Processing will update the document's tag repository when tlinks are added.
process_future(self)
This is an alternative way to do process() that is not used yet. The difference is that it uses subprocess instead of os.system() and that it pipes each line to the classifier, not using any temporary files. It has one weird problem, which is that when we process the very first line the identifier is missing from the output.

Private Functions

_add_links(self, ee_vectors, et_vectors, ee_results, et_results)
Insert new tlinks into the document using the vectors and the results from the classifier.
_add_links_future(self, ee_results, et_results)
Insert new tlinks into the document using the results from the classifier.
module functions