Last active
April 30, 2022 13:50
-
-
Save neuromaancer/4ae2d93c2671fb7d2b5d8a7011a95cd4 to your computer and use it in GitHub Desktop.
dict_operations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 合并两个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