Skip to content

Instantly share code, notes, and snippets.

@aniruddha27
Last active June 28, 2020 17:51
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save aniruddha27/892523c05814ce7e6599531d83e7b203 to your computer and use it in GitHub Desktop.
# create a df containing sentence and its output for modified rule 1
row_list = []
# df2 contains all the sentences from all the speeches
for i in range(len(df2)):
sent = df2.loc[i,'Sent']
year = df2.loc[i,'Year']
output = rule1_mod(sent)
dict1 = {'Year':year,'Sent':sent,'Output':output}
row_list.append(dict1)
df_rule1_mod_all = pd.DataFrame(row_list)
# check rule1 output on complete speeches
output_per(df_rule1_mod_all,'Output')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment