This toolkit contains tools to extract conversational features and analyze social phenomena in conversations. Several large conversational datasets are included together with scripts exemplifying the use of the toolkit on these datasets.
The toolkit currently implements features for:
Linguistic coordination, a measure of linguistic influence (and relative power) between individuals or groups based on their use of function words (see the Echoes of Power paper). Example script exploring the balance of power in the US Supreme Court.
Politeness strategies, a set of lexical and parse-based features correlating with politeness and impoliteness (see the A computational approach to politeness paper). Example script for understanding the (mis)use of politeness strategies in conversations gone awry on Wikipedia.
Question typology, an unsupervised method for extracting surface motifs that recur in questions, and for grouping them according to their latent rhetorical role (see the Asking too much paper). Example scripts for extracting common question types in the UK parliament, on Wikipedia edit pages, and in sport interviews.
Conversational prompts, an unsupervised method for extracting types of conversational prompts (see the Conversations gone awry paper). Example script for understanding the use of conversational prompts in conversations gone awry on Wikipedia.
Coming soon: Basic message and turn features, currently available here Constructive conversations
These datasets are included for ready use with the toolkit:
Conversations Gone Awry Corpus: a collection of conversations from Wikipedia talk pages that derail into personal attacks (1,270 conversations, 6,963 comments)
Tennis Corpus: transcripts for tennis singles post-match press conferences for major tournaments between 2007 to 2015 (6,467 post-match press conferences)
Wikipedia Talk Pages Corpus: collection of conversations from Wikipedia editors' talk pages
Supreme Court Corpus: collection of conversations from the U.S. Supreme Court Oral Arguments
Parliament Corpus: parliamentary question periods from May 1979 to December 2016 (216,894 question-answer pairs)
To use the toolkit with your own dataset, it needs to be in a standard json format.
This toolkit requires Python 3.
- Download the toolkit:
pip3 install convokit
- Download Spacy's English model:
python3 -m spacy download en
Alternatively, visit our Github Page to install from source.
See the example ipython notebooks linked above to familiarize yourself with how to use the different modules of the toolkit. The basic process is:
import convokitinto your python3 project.
- Load a corpus of conversations using
corpus = convokit.Corpus(filename=...); use your own corpus or one of the ones provided with the toolkit.
- Use convokit functionality to extract features from the conversations, for example
ps = convokit.PolitenessStrategies(corpus)extracts the politeness strategies used in all the conversations.
- Have fun analyzing coversations.
Documentation is hosted here.
The documentation is built with Sphinx (
pip3 install sphinx). To build it yourself, navigate to
doc/ and run
Andrew Wang (firstname.lastname@example.org) wrote the Coordination code and the respective example script, wrote the helper functions and designed the structure of the toolkit.
Ishaan Jhaveri (email@example.com) refactored the Question Typology code and wrote the respective example scripts.
Jonathan Chang (firstname.lastname@example.org) wrote the example script for Conversations Gone Awry.