def savePosScores(pos_tags_scores_neutral, pos_tags_scores_positive,pos_tags_scores_negative,pos_bigrams_scores_neutral,pos_bigrams_scores_positive,pos_bigrams_scores_negative,pos_trigrams_scores_neutral,pos_trigrams_scores_positive,pos_trigrams_scores_negative,mpqaScores):
with open('resources/scores.pkl', 'wb') as output:
pickle.dump(pos_tags_scores_neutral, output, pickle.HIGHEST_PROTOCOL)
pickle.dump(pos_tags_scores_positive, output, pickle.HIGHEST_PROTOCOL)
pickle.dump(pos_tags_scores_negative, output, pickle.HIGHEST_PROTOCOL)
pickle.dump(pos_bigrams_scores_neutral, output, pickle.HIGHEST_PROTOCOL)
pickle.dump(pos_bigrams_scores_positive, output, pickle.HIGHEST_PROTOCOL)
pickle.dump(pos_bigrams_scores_negative, output, pickle.HIGHEST_PROTOCOL)
pickle.dump(pos_trigrams_scores_neutral, output, pickle.HIGHEST_PROTOCOL)
pickle.dump(pos_trigrams_scores_positive, output, pickle.HIGHEST_PROTOCOL)
pickle.dump(pos_trigrams_scores_negative, output, pickle.HIGHEST_PROTOCOL)
pickle.dump(mpqaScores, output, pickle.HIGHEST_PROTOCOL)
print "POS scores saved"
#save lexicons
评论列表
文章目录