Loading process_srl.py +3 −1 Original line number Diff line number Diff line Loading @@ -34,10 +34,12 @@ df['lemma'] = df.verb.apply(lemmatizer.lemmatize) vad = pd.read_csv('data/NRC-VAD-Lexicon.txt', delimiter='\t', index_col=0) df['dom'] = df.lemma.apply(get_dom) grs = df.drop_duplicates.groupby('same') grs = df.drop_duplicates().groupby('same') # symptoms of agency for n, gr in grs: print(n) print(gr.nlargest(n=10, columns=['dom'])) print('\n', gr.dom.mean()) print('\n',gr['arg'].value_counts().head(n=10)) Loading
process_srl.py +3 −1 Original line number Diff line number Diff line Loading @@ -34,10 +34,12 @@ df['lemma'] = df.verb.apply(lemmatizer.lemmatize) vad = pd.read_csv('data/NRC-VAD-Lexicon.txt', delimiter='\t', index_col=0) df['dom'] = df.lemma.apply(get_dom) grs = df.drop_duplicates.groupby('same') grs = df.drop_duplicates().groupby('same') # symptoms of agency for n, gr in grs: print(n) print(gr.nlargest(n=10, columns=['dom'])) print('\n', gr.dom.mean()) print('\n',gr['arg'].value_counts().head(n=10))