'Trains Model.classifier with the document vectors.
Each document is expected to have a Document.type.
Model.predict() can then be used to predict the type of other (unknown) documents.'

def train(self, *args, **kwargs):

    if (len(args) == 0):
        Classifier = kwargs.pop('Classifier', NB)
    if (len(args) >= 1):
        Classifier = args[0]
        args = args[1:]
    kwargs['train'] = self
    self._classifier = Classifier(*args, **kwargs)
    self._classifier.finalize()
