Created
June 5, 2020 21:33
-
-
Save aniruddha27/fff561c3b929af6dde900840703ba9fd to your computer and use it in GitHub Desktop.
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
# create a df containing sentence and its output for 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(sent) | |
dict1 = {'Year':year,'Sent':sent,'Output':output} | |
row_list.append(dict1) | |
df_rule1_all = pd.DataFrame(row_list) | |
# check rule1 output on complete speeches | |
output_per(df_rule1_all,'Output') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment