Skip to content

Instantly share code, notes, and snippets.

@neuromaancer
Last active April 30, 2022 13:50
Show Gist options
  • Save neuromaancer/4ae2d93c2671fb7d2b5d8a7011a95cd4 to your computer and use it in GitHub Desktop.
Save neuromaancer/4ae2d93c2671fb7d2b5d8a7011a95cd4 to your computer and use it in GitHub Desktop.
dict_operations
# 合并两个dict 同keys, values 相加
def get(compe_list, text_list):
span_score = calcul_span_score.calcul_span_score(text_list, compe_list)
fre_score = calcul_fre_score.calcul_fre_score(text_list, compe_list)
span_score_counter = Counter(span_score)
fre_score_counter = Counter(fre_score)
scores_dict = dict(span_score_counter + fre_score_counter)
return scores_dict
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment