Skip to content

Commit

Permalink
valence punctuation unit testS
Browse files Browse the repository at this point in the history
  • Loading branch information
agshruti12 committed Oct 18, 2024
1 parent 6b94149 commit f68d1b4
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 96 deletions.
14 changes: 13 additions & 1 deletion tests/data/cleaned_data/test_chat_level.csv
Original file line number Diff line number Diff line change
Expand Up @@ -678,4 +678,16 @@ I respond to that too",num_block_quote_responses,2.0
0,0,maybe I guess possibly sort of a little,hedge_words_lexical_wordcount,5
0,0,a little possibly I think sort of probably,hedge_words_lexical_wordcount,5
0,0,probably sort of,hedge_words_lexical_wordcount,2
0,0,I think,hedge_words_lexical_wordcount,1
0,0,I think,hedge_words_lexical_wordcount,1
0,0,I love dogs,positive_bert,0.932
0,0,I love dogs!!!,positive_bert,0.980
0,0,I love dogs,negative_bert,0.012
0,0,I love dogs!!!,negative_bert,0.004
0,0,This is relatively neutral,neutral_bert,0.470
0,0,This is relatively neutral,positive_bert,0.505
0,0,This is relatively neutral...,neutral_bert,0.492
0,0,What the heck is going on,negative_bert,0.541
0,0,What the heck is going on??,negative_bert,0.730
0,0,!!!,positive_bert,0.917
0,0,.,neutral_bert,0.577
0,0,???,neutral_bert,0.713
191 changes: 96 additions & 95 deletions tests/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,107 +43,108 @@
"Forward Flow",
"Discursive Diversity"
],
turns = False
turns = False,
regenerate_vectors=True
)
testing_chat.featurize()

testing_conv = FeatureBuilder(
input_df = conv_df,
vector_directory = "./vector_data/",
output_file_path_chat_level = "./output/chat/test_conv_level_chat.csv",
output_file_path_user_level = "./output/user/test_conv_level_user.csv",
output_file_path_conv_level = "./output/conv/test_conv_level_conv.csv",
custom_features = [
"(BERT) Mimicry",
"Moving Mimicry",
"Forward Flow",
"Discursive Diversity"
],
turns = False
)
testing_conv.featurize()
# testing_conv = FeatureBuilder(
# input_df = conv_df,
# vector_directory = "./vector_data/",
# output_file_path_chat_level = "./output/chat/test_conv_level_chat.csv",
# output_file_path_user_level = "./output/user/test_conv_level_user.csv",
# output_file_path_conv_level = "./output/conv/test_conv_level_conv.csv",
# custom_features = [
# "(BERT) Mimicry",
# "Moving Mimicry",
# "Forward Flow",
# "Discursive Diversity"
# ],
# turns = False
# )
# testing_conv.featurize()

test_ner_feature_builder = FeatureBuilder(
input_df = test_ner_df,
ner_training_df = test_ner_training_df,
vector_directory = "./vector_data/",
output_file_path_chat_level = "./output/chat/test_named_entity_chat_level.csv",
output_file_path_user_level = "./output/user/test_named_entity_user_level.csv",
output_file_path_conv_level = "./output/conv/test_named_entity_conversation_level.csv",
custom_features = [
"(BERT) Mimicry",
"Moving Mimicry",
"Forward Flow",
"Discursive Diversity"
],
turns = False
)
test_ner_feature_builder.featurize()
# test_ner_feature_builder = FeatureBuilder(
# input_df = test_ner_df,
# ner_training_df = test_ner_training_df,
# vector_directory = "./vector_data/",
# output_file_path_chat_level = "./output/chat/test_named_entity_chat_level.csv",
# output_file_path_user_level = "./output/user/test_named_entity_user_level.csv",
# output_file_path_conv_level = "./output/conv/test_named_entity_conversation_level.csv",
# custom_features = [
# "(BERT) Mimicry",
# "Moving Mimicry",
# "Forward Flow",
# "Discursive Diversity"
# ],
# turns = False
# )
# test_ner_feature_builder.featurize()

# testing perturbed chat level features
testing_chat_complex = FeatureBuilder(
input_df = chat_complex_df,
vector_directory = "./vector_data/",
output_file_path_chat_level = "./output/chat/test_chat_level_chat_complex.csv",
output_file_path_user_level = "./output/user/test_chat_level_user_complex.csv",
output_file_path_conv_level = "./output/conv/test_chat_level_conv_complex.csv",
custom_features = [
"(BERT) Mimicry",
"Moving Mimicry",
"Forward Flow",
"Discursive Diversity"
],
turns = False
)
testing_chat_complex.featurize()
# # testing perturbed chat level features
# testing_chat_complex = FeatureBuilder(
# input_df = chat_complex_df,
# vector_directory = "./vector_data/",
# output_file_path_chat_level = "./output/chat/test_chat_level_chat_complex.csv",
# output_file_path_user_level = "./output/user/test_chat_level_user_complex.csv",
# output_file_path_conv_level = "./output/conv/test_chat_level_conv_complex.csv",
# custom_features = [
# "(BERT) Mimicry",
# "Moving Mimicry",
# "Forward Flow",
# "Discursive Diversity"
# ],
# turns = False
# )
# testing_chat_complex.featurize()

# testing conv features
testing_conv_complex = FeatureBuilder(
input_df = conv_complex_df,
vector_directory = "./vector_data/",
output_file_path_chat_level = "./output/chat/test_conv_level_chat_complex.csv",
output_file_path_user_level = "./output/user/test_conv_level_user_complex.csv",
output_file_path_conv_level = "./output/conv/test_conv_level_conv_complex.csv",
custom_features = [
"(BERT) Mimicry",
"Moving Mimicry",
"Forward Flow",
"Discursive Diversity"
],
turns = False
)
testing_conv_complex.featurize()
# # testing conv features
# testing_conv_complex = FeatureBuilder(
# input_df = conv_complex_df,
# vector_directory = "./vector_data/",
# output_file_path_chat_level = "./output/chat/test_conv_level_chat_complex.csv",
# output_file_path_user_level = "./output/user/test_conv_level_user_complex.csv",
# output_file_path_conv_level = "./output/conv/test_conv_level_conv_complex.csv",
# custom_features = [
# "(BERT) Mimicry",
# "Moving Mimicry",
# "Forward Flow",
# "Discursive Diversity"
# ],
# turns = False
# )
# testing_conv_complex.featurize()

testing_conv_complex_ts = FeatureBuilder(
input_df = conv_complex_timestamps_df,
vector_directory = "./vector_data/",
output_file_path_chat_level = "./output/chat/test_conv_level_chat_complex_ts.csv",
output_file_path_user_level = "./output/user/test_conv_level_user_complex_ts.csv",
output_file_path_conv_level = "./output/conv/test_conv_level_conv_complex_ts.csv",
custom_features = [
"(BERT) Mimicry",
"Moving Mimicry",
"Forward Flow",
"Discursive Diversity"
],
turns = False
)
testing_conv_complex_ts.featurize()
# testing_conv_complex_ts = FeatureBuilder(
# input_df = conv_complex_timestamps_df,
# vector_directory = "./vector_data/",
# output_file_path_chat_level = "./output/chat/test_conv_level_chat_complex_ts.csv",
# output_file_path_user_level = "./output/user/test_conv_level_user_complex_ts.csv",
# output_file_path_conv_level = "./output/conv/test_conv_level_conv_complex_ts.csv",
# custom_features = [
# "(BERT) Mimicry",
# "Moving Mimicry",
# "Forward Flow",
# "Discursive Diversity"
# ],
# turns = False
# )
# testing_conv_complex_ts.featurize()

# testing forward flow
testing_forward_flow = FeatureBuilder(
input_df = test_forward_flow_df,
vector_directory = "./vector_data/",
output_file_path_chat_level = "./output/chat/test_forward_flow_chat.csv",
output_file_path_user_level = "./output/user/test_forward_flow_user.csv",
output_file_path_conv_level = "./output/conv/test_forward_flow_conv.csv",
custom_features = [
"(BERT) Mimicry",
"Moving Mimicry",
"Forward Flow",
"Discursive Diversity"
],
turns = False
)
# # testing forward flow
# testing_forward_flow = FeatureBuilder(
# input_df = test_forward_flow_df,
# vector_directory = "./vector_data/",
# output_file_path_chat_level = "./output/chat/test_forward_flow_chat.csv",
# output_file_path_user_level = "./output/user/test_forward_flow_user.csv",
# output_file_path_conv_level = "./output/conv/test_forward_flow_conv.csv",
# custom_features = [
# "(BERT) Mimicry",
# "Moving Mimicry",
# "Forward Flow",
# "Discursive Diversity"
# ],
# turns = False
# )

testing_forward_flow.featurize()
# testing_forward_flow.featurize()

0 comments on commit f68d1b4

Please sign in to comment.