code: def extract_features(self, text):
          
          # Feature extractor may take one or two arguments
          try:
              return self.feature_extractor(text, self.train_set)
          except (TypeError, AttributeError):
              return self.feature_extractor(text)
docs: Extracts features from a body of text.
  
          :rtype: dictionary of features