def extract_features(self, text):
<EOL>try:<EOL><INDENT>return self.feature_extractor(text, self.train_set)<EOL><DEDENT>except (TypeError, AttributeError):<EOL><INDENT>return self.feature_extractor(text)<EOL><DEDENT>
Extracts features from a body of text.

        :rtype: dictionary of features