'Extracts features from a body of text.
:rtype: dictionary of features'

def extract_features(self, text):

    try:
        return self.feature_extractor(text, self.train_set)
    except (TypeError, AttributeError):
        return self.feature_extractor(text)
