Skip to content

Politeness V2

kumarnik1 edited this page May 12, 2024 · 5 revisions

1. Feature Name

Politeness V2

2. Literature Source (Serial Number, link)

Conversational receptiveness: Improving engagement with opposing views (https://www.sciencedirect.com/science/article/pii/S0749597819303425)

SECR Module: https://github.com/bbevis/SECR/tree/main

3. Description of how the feature is computed (In Layman’s terms)

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.

4. Algorithms used (KNN, Logistic Regression etc.)

N/A

5. ML Inputs/Features

N/A

6. Statistical concepts used

N/A

7. Pages of the literature to be referred to for details

N/A

8. Any tweaks/changes/adaptions made from the original source

Combined prep and feature_extraction file into one; all other files were not necessary for features

Clone this wiki locally