def gen_bag_feats(self, e_set):
if(hasattr(self, '<STR_LIT>')):<EOL><INDENT>sfeats = self._stem_dict.transform(e_set._clean_stem_text)<EOL>nfeats = self._normal_dict.transform(e_set._text)<EOL>bag_feats = numpy.concatenate((sfeats.toarray(), nfeats.toarray()), axis=<NUM_LIT:1>)<EOL><DEDENT>else:<EOL><INDENT>raise util_functions.InputError(self, "<STR_LIT>")<EOL><DEDENT>return bag_feats.copy()<EOL>
Generates bag of words features from an input essay set and trained FeatureExtractor
Generally called by gen_feats
Returns an array of features
e_set - EssaySet object