ConvoKit: A Toolkit for the Analysis of Conversations
Summary
General NLP libraries such as NLTK, spaCy and scikit-learn are not designed for dialogue. Conversational data and code are also scattered across incompatible formats and one-off implementations, which hurts reproducibility. The authors present ConvoKit, an open-source Python package that treats conversations as structured social interactions rather than isolated text fragments. Its design rests on two abstractions. The Corpus is a hierarchy of Conversations, Utterances and Speakers, with reply links and user-defined metadata. The Transformer is a uniform operation that modifies a Corpus and follows the scikit-learn interface. Built-in Transformers handle text cleaning, parsing, feature extraction (politeness, hypergraph structure) and analysis (lexical comparison, classification, forecasting conversation trajectories). The package also ships ready-to-use datasets from very different settings: courtrooms, Wikipedia, Reddit and film scripts. The paper reports no benchmark results. Its contribution is a single shared representation and interface for conversational analysis. This makes such research easier to reproduce and opens it to social scientists who lack deep NLP expertise.
Key points
- Four core classes (Corpus, Conversation, Utterance, Speaker) carry unique IDs and a free-form
metatable. Thread structure comes from each Utterance'sreply_topointer, which allows tree traversal and browsing of a Speaker's history. - Transformers expose
fit()andtransform()like scikit-learn, plus asummarize()method for quick tables or plots. They can be chained in pipelines. - Built-in Transformers are grouped into three roles:
- preprocessing: TextCleaner, TextParser;
- feature extraction: PolitenessStrategies, UserConvoDiversity, HyperConvo;
- analysis: FightingWords, Classifier, Forecaster.
- Bundled corpora include supreme court transcripts, Wikipedia talk pages, a full Reddit dump and movie dialogs. Guidelines and code are provided for converting other datasets.
- A worked example compares the language of mixed-gender and single-gender movie dialogs with FightingWords. The toolkit is available at convokit.cornell.edu.
Cited by
- Gender and Politeness Perception: A Novel Approach for Exploring Annotations Disagreement
- Facilitating the Communication of Politeness through Fine-Grained Paraphrasing
- Disentangling Indirect Answers to Yes-No Questions in Real Conversations
- Can Large Language Models Transform Computational Social Science?
Cite
@inproceedings{chang2020convokit,
title = {{ConvoKit: A Toolkit for the Analysis of Conversations}},
author = {Chang, Jonathan P. and Chiam, Caleb and Fu, Liye and Wang, Andrew and Zhang, Justine and Danescu-Niculescu-Mizil, Cristian},
booktitle = {Proceedings of the 21th Annual Meeting of the Special Interest Group on Discourse and Dialogue},
year = {2020},
doi = {10.18653/v1/2020.sigdial-1.8},
url = {https://doi.org/10.18653/v1/2020.sigdial-1.8}
}References
- Steven Bird, Edward Loper, and Ewan Klein. 2009. Natural Language Processing with Python. O’Reilly Media Inc. find
- Jonathan P. Chang and Cristian Danescu-Niculescu-Mizil. 2019. Trouble on the Horizon: Forecasting the Derailment of Online Conversations as they Develop. In Proceedings of EMNLP. find
- Cristian Danescu-Niculescu-Mizil, Moritz Sudhof, Dan Jurafsky, Jure Leskovec, and Christopher Potts. 2013. A Computational Approach to Politeness with Application to Social Factors. In Proceedings of ACL. find our card
- Matthew Honnibal and Ines Montani. 2020. spaCy: Natural Language Understanding with Bloom Embeddings, Convolutional Neural Networks and Incremental Parsing. find
This page in Markdown → https://md.research.elamur.ai/free/papers/chang-2020-convokit-toolkit-analysis-conversations/