Cornell Conversational Analysis Toolkit
This toolkit contains tools to analyze social phenomena in conversations. Currently implements features for:
-
Linguistic coordination, a measure of relative power between individuals or groups based on their use of function words (see the Echoes of Power paper)
-
Coming soon: Question typology, a 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)
Installing
The toolkit requires Python 3. Run python3 setup.py install
to install the package.
Use import convokit
to import it into your project.
Examples
See examples/
for guided examples and reproductions of charts from the original
papers.
Documentation
Documentation is hosted here.
The documentation is built with Sphinx (pip3 install sphinx
). To build it yourself, navigate to doc/
and run make html
.
Basic usage
Coordination
- Load corpus:
corpus = convokit.Corpus(filename=...)
- Create coordination object:
coord = convokit.Coordination(corpus)
- Define groups using
corpus.users
:group_A = corpus.users(lambda user: user.info["is-justice"]) # [roberts, ginsburg, ...]
- Compute coordination:
scores = coord.score(group_A, group_B)
- (Optional) get aggregate scores:
average_by_marker_agg1, average_by_marker, agg1, agg2, agg3 = coord.score_report(scores)