politeness_features module
- features.politeness_features.get_politeness_strategies(text)
Using the ConvoKit politeness package, obtains politeness annotations of each message, with some fields including HASHEDGE, Factuality, Deference, Gratitude, Apologizing, etc.
Source: https://convokit.cornell.edu/documentation/politenessStrategies.html
- Parameters:
text (str) – The text of the utterance to be analyzed.
- Returns:
A dictionary containing the politeness strategies extracted, in a format as follows. These names are then cleaned up downstream in the ChatLevelFeaturesCalculator before being appended to the output dataframe.
- Return type:
dict