Loading process_srl.py +3 −1 Original line number Diff line number Diff line Loading @@ -90,7 +90,9 @@ def cust(x): grs = pd.DataFrame() for n, gr in df.groupby(['bias', 'name_bias']): counts = gr.verb.value_counts() counts2 = counts / overall_counts.loc[counts.index] counts = counts / overall_counts.loc[counts.index] counts2 = overall_counts.loc[counts.index] counts.index += counts.apply(cust) counts.index += counts2.apply(cust) sorted_verbs = counts.sort_values(ascending=False).head(args.n) grs[n] = sorted_verbs.index Loading Loading
process_srl.py +3 −1 Original line number Diff line number Diff line Loading @@ -90,7 +90,9 @@ def cust(x): grs = pd.DataFrame() for n, gr in df.groupby(['bias', 'name_bias']): counts = gr.verb.value_counts() counts2 = counts / overall_counts.loc[counts.index] counts = counts / overall_counts.loc[counts.index] counts2 = overall_counts.loc[counts.index] counts.index += counts.apply(cust) counts.index += counts2.apply(cust) sorted_verbs = counts.sort_values(ascending=False).head(args.n) grs[n] = sorted_verbs.index Loading