The politeness Package: Detecting Politeness in Natural Language

This package provides tools to extract politeness markers in English natural language. It also allows researchers to easily visualize and quantify politeness between groups of documents. This package combines and extends prior research on the linguistic markers of politeness (Brown and Levinson, 1987; Danescu-Niculescu-Mizil et al., 2013; Voigt et al., 2017). We demonstrate two applications for detecting politeness in natural language during consequential social interactions— distributive negotiations, and speed dating.

Michael Yeomans , Alejandro Kantor , Dustin Tingley

Supplementary materials

Supplementary materials are available in addition to this article. It can be downloaded at

CRAN packages used

tidytext, tm, quanteda, coreNLP, spacyR, SentimentAnalysis, syuzhet, topicmodeling, stm, glmnet, textir, hunspell, data.table, politeness

CRAN Task Views implied by cited packages

NaturalLanguageProcessing, HighPerformanceComputing, Finance, MachineLearning, Survival


Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".


For attribution, please cite this work as

Yeomans, et al., "The R Journal: The politeness Package: Detecting Politeness in Natural Language", The R Journal, 2018

BibTeX citation

  author = {Yeomans, Michael and Kantor, Alejandro and Tingley, Dustin},
  title = {The R Journal: The politeness Package: Detecting Politeness in Natural Language},
  journal = {The R Journal},
  year = {2018},
  note = {},
  doi = {10.32614/RJ-2018-079},
  volume = {10},
  issue = {2},
  issn = {2073-4859},
  pages = {489-502}