-
Notifications
You must be signed in to change notification settings - Fork 6
Politeness V2
kumarnik1 edited this page May 12, 2024
·
5 revisions
Politeness V2
Conversational receptiveness: Improving engagement with opposing views (https://www.sciencedirect.com/science/article/pii/S0749597819303425)
SECR Module: https://github.com/bbevis/SECR/tree/main
We follow a very similar framework to the SECR Module to compute a 39 politeness features for each chat in a conversation. The chats are first preprocessed in the following ways:
- Lowercasing all words
- Remove/expand contractions (i.e don’t to do not; can’t to cannot; let’s to let us)
- Ensure all characters are legal traditional A-Z alphabet letters by using corresponding RegExs
We then calculate the general categories of features in different ways, following similar structure as the SECR module.
- count_matches and Adverb_Limiter: calculates features using a standard bag-of-words approach, detecting the number of keywords from a pre-specified list stored in keywords.py.
- get_dep_pairs/get_dep_pairs_noneg: use Spacy to get dependency pairs for relevant words, using token.dep_ to differentiate with negation.
- Question: Question-related features are computed by counting the number of question words in a chat.
- word_start: detect certain conjunctions/affirmation words using pre-specified dictionary
The corresponding counts are then returned concatenated to the original dataframe.
N/A
N/A
N/A
N/A
Combined prep and feature_extraction file into one; all other files were not necessary for features