politeness_v2 module

features.politeness_v2.get_politeness_v2(df, on_column)

Calculates politness based on Yeomans et. al, 2020: https://www.mikeyeomans.info/papers/receptiveness.pdf, coded into this package: https://github.com/bbevis/SECR

Parameters:
  • df (pd.DataFrame) – The dataframe containing the text on which we wish to apply the feature

  • on_column (str) – The header of the column containing the text on which this feature will be applied

Returns:

A dataframe containing the values of linguistic markers that determine politeness

Return type:

pd.DataFrame