def grade_generic(grader_data, numeric_features, textual_features):
results = {'<STR_LIT>': [],'<STR_LIT>': [],'<STR_LIT>': <NUM_LIT:0>, '<STR_LIT:success>' : False, '<STR_LIT>' : <NUM_LIT:0>}<EOL>has_error=False<EOL>grader_set=predictor_set.PredictorSet(essaytype="<STR_LIT:test>")<EOL>model, extractor = get_classifier_and_ext(grader_data)<EOL>try:<EOL><INDENT>grader_set.add_row(numeric_features, textual_features,<NUM_LIT:0>)<EOL><DEDENT>except Exception:<EOL><INDENT>error_msg = "<STR_LIT>".format(numeric_features, textual_features)<EOL>log.exception(error_msg)<EOL>results['<STR_LIT>'].append(error_msg)<EOL>has_error=True<EOL><DEDENT>try:<EOL><INDENT>grader_feats=extractor.gen_feats(grader_set)<EOL>results['<STR_LIT>']=model.predict(grader_feats)[<NUM_LIT:0>]<EOL><DEDENT>except Exception:<EOL><INDENT>error_msg = "<STR_LIT>"<EOL>log.exception(error_msg)<EOL>results['<STR_LIT>'].append(error_msg)<EOL>has_error=True<EOL><DEDENT>try:<EOL><INDENT>results['<STR_LIT>'] = get_confidence_value(grader_data['<STR_LIT>'],model, grader_feats, results['<STR_LIT>'])<EOL><DEDENT>except Exception:<EOL><INDENT>log.exception("<STR_LIT>")<EOL><DEDENT>if not has_error:<EOL><INDENT>results['<STR_LIT:success>'] = True<EOL><DEDENT>return results<EOL>
Grades a set of numeric and textual features using a generic model
grader_data -- dictionary containing:
{
    'algorithm' - Type of algorithm to use to score
}
numeric_features - list of numeric features to predict on
textual_features - list of textual feature to predict on