Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Priya/docs #266

Merged
merged 7 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/build/doctrees/features/index.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/features/politeness_v2.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/features/politeness_v2_helper.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/features/reddit_tags.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/features/word_mimicry.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 5 additions & 1 deletion docs/build/html/_sources/features/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ Utterance-Level features are calculated *first* in the Toolkit, as many conversa
readability
textblob_sentiment_analysis
named_entity_recognition_features
politeness_v2
politeness_v2_helper
reddit_tags
word_mimicry
fflow

Conversation-Level Features
Expand All @@ -42,4 +46,4 @@ Once utterance-level features are computed, we compute conversation-level featur

Speaker- (User) Level Features
*********************************
User-level features currently represent an aggregation of features at the utterance- level (for example, the average number of words spoken *by a particular user*). There is therefore no separate speaker-level feature documentation; you may reference the :ref:`Speaker (User)-Level Features Page <user_level_features>` for more information.
User-level features currently represent an aggregation of features at the utterance- level (for example, the average number of words spoken *by a particular user*). There is therefore no separate speaker-level feature documentation; you may reference the :ref:`Speaker (User)-Level Features Page <user_level_features>` for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
.. _turn_taking_index:

Turn Taking Index
=================

High-Level Intuition
*********************
This feature measures the extent to which people take turns in a conversation. "Turns" are the number of distinct, broken up "chats" in a row during which a person has the "floor" during a conversation.

The turn-taking index, a value between 0 and 1, distinguishes between teams that have individuals who speak in big chunks (in this case, the value will be closer to 0) versus teams that have individuals interrupting each other a great deal (in the case of perfect turn-taking, the value is equal to 1).

Citation
*********
`Almaatouq, Alsobay et al. (2023) <https://onlinelibrary.wiley.com/doi/pdf/10.1111/tops.12706>`_

Implementation Basics
**********************
The turn-taking formula is: (Number of Turns - 1) / (Total Number of Chats - 1)

For example, in the following dataframe:

.. list-table:: Speaker Turn Counts
:widths: 60 25
:header-rows: 1

* - speaker_nickname
- turn_count
* - emily
- 5
* - amy
- 10
* - nikhil
- 2
* - emily
- 1
* - amy
- 2

Number of turns taken = 5 (Emily, Amy, Nikhil, Emily, Amy) Total Number of Chats = 5 + 10 + 2 + 1 + 2 = 20

Index = (5-1)/(20-1) = 0.21

The -1 at the top and bottom of the fraction is due to the fact that if one person talks for the entire time
(e.g., the whole conversation is just a monologue), then we want the index to be 0, not 1 / (n_chats).

Implementation Notes/Caveats
*****************************
In Almaatouq, Alsobay et al. (2023), turn-taking was originally measured in terms of actions in a game.

A player took a "turn" when they made a bunch of uninterrupted turns in a game; then, their turn-taking index divided the number of uninterrupted turns by the total number of turns taken:

A group’s turn-taking index for a given round is measured by dividing the number of turns taken (a turn is an uninterrupted sequence of room assignments made by a single player, each defining an intermediate solution) by the total number of solutions generated on a particular task instance.

According to the original authors:

This measure is intended to differentiate between groups that collaborate in blocks (e.g., Player 1 moves N times, then Player 2 moves N times, then Player 3 moves N times) and groups that collaborate more dynamically (e.g., Players 1, 2, and 3 alternate moves, for a total of 3N moves)—in the first example, the number of turns taken is 3, and in the second example, the number of turns taken is 3N, but the total number of solutions generated is the same in both cases.

In our system, we adapt this measure by operationalizing turns *within a conversation* --- treating them as the number of distinct, broken up "chats" in a row during which a person has the "floor."

The turn-taking index therefore distinguishes between teams that have people speak in big chunks (you say your piece, then I say mine, debate-style), versus teams that have people interrupting each other a great deal.

Interpreting the Feature
*************************
In the edge case where only a single person spoke the entire time, causing the denominator to be 0, the turn-taking index is set to 0.

Related Features
*****************
N/A
28 changes: 28 additions & 0 deletions docs/build/html/_sources/features_conceptual/word_ttr.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.. _word_ttr:

Word Type-Token Ratio
=====================

High-Level Intuition
*********************
This feature measures the ratio of the number of unique words ("types") to the total number of words ("tokens") is an utterance. This is a standard measure of `lexical density <https://en.wikipedia.org/wiki/Lexical_density>`_.

Citation
*********
`Reichel, et al. (2015) <https://cpb-us-e1.wpmucdn.com/sites.northwestern.edu/dist/f/1603/files/2017/01/Reichel_etal_Interspeech_2015-2i4gnzk.pdf>`_

`Williamson (2009) <https://www.sltinfo.com/wp-content/uploads/2014/01/type-token-ratio.pdf>`_

Implementation Basics
**********************
The Type-Token Ratio is calculated as follows: Number of Unique Words / Number of Total Words.

The function assumes that punctuation is retained when being inputted, but parses it out within the function.

Interpreting the Feature
*************************
A low type-token ratio indicates that an individual is using many of the same words over and over; for example, if an individual is speaking with great hesitation, repeating themselves, or using filler and functional words ("um", "that is", "the"), there will be fewer unique words relative to the total number of words. Individuals who choose their words carefully, with minimal repetition, will tend to have a higher type-token ratio. The mode of communication can also impact lexical density; individuals typically have a lower type-token ratio when speaking out loud than when writing.

Related Features
*****************
N/A
4 changes: 4 additions & 0 deletions docs/build/html/features/basic_features.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@
<li class="toctree-l3"><a class="reference internal" href="readability.html">readability module</a></li>
<li class="toctree-l3"><a class="reference internal" href="textblob_sentiment_analysis.html">textblob_sentiment_analysis module</a></li>
<li class="toctree-l3"><a class="reference internal" href="named_entity_recognition_features.html">named_entity_recognition_features module</a></li>
<li class="toctree-l3"><a class="reference internal" href="politeness_v2.html">politeness_v2 module</a></li>
<li class="toctree-l3"><a class="reference internal" href="politeness_v2_helper.html">politeness_v2_helper module</a></li>
<li class="toctree-l3"><a class="reference internal" href="reddit_tags.html">reddit_tags module</a></li>
<li class="toctree-l3"><a class="reference internal" href="word_mimicry.html">word_mimicry module</a></li>
<li class="toctree-l3"><a class="reference internal" href="fflow.html">fflow module</a></li>
</ul>
</li>
Expand Down
4 changes: 4 additions & 0 deletions docs/build/html/features/certainty.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
<li class="toctree-l3"><a class="reference internal" href="readability.html">readability module</a></li>
<li class="toctree-l3"><a class="reference internal" href="textblob_sentiment_analysis.html">textblob_sentiment_analysis module</a></li>
<li class="toctree-l3"><a class="reference internal" href="named_entity_recognition_features.html">named_entity_recognition_features module</a></li>
<li class="toctree-l3"><a class="reference internal" href="politeness_v2.html">politeness_v2 module</a></li>
<li class="toctree-l3"><a class="reference internal" href="politeness_v2_helper.html">politeness_v2_helper module</a></li>
<li class="toctree-l3"><a class="reference internal" href="reddit_tags.html">reddit_tags module</a></li>
<li class="toctree-l3"><a class="reference internal" href="word_mimicry.html">word_mimicry module</a></li>
<li class="toctree-l3"><a class="reference internal" href="fflow.html">fflow module</a></li>
</ul>
</li>
Expand Down
8 changes: 6 additions & 2 deletions docs/build/html/features/fflow.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="burstiness module" href="burstiness.html" />
<link rel="prev" title="named_entity_recognition_features module" href="named_entity_recognition_features.html" />
<link rel="prev" title="word_mimicry module" href="word_mimicry.html" />
</head>

<body class="wy-body-for-nav">
Expand Down Expand Up @@ -62,6 +62,10 @@
<li class="toctree-l3"><a class="reference internal" href="readability.html">readability module</a></li>
<li class="toctree-l3"><a class="reference internal" href="textblob_sentiment_analysis.html">textblob_sentiment_analysis module</a></li>
<li class="toctree-l3"><a class="reference internal" href="named_entity_recognition_features.html">named_entity_recognition_features module</a></li>
<li class="toctree-l3"><a class="reference internal" href="politeness_v2.html">politeness_v2 module</a></li>
<li class="toctree-l3"><a class="reference internal" href="politeness_v2_helper.html">politeness_v2_helper module</a></li>
<li class="toctree-l3"><a class="reference internal" href="reddit_tags.html">reddit_tags module</a></li>
<li class="toctree-l3"><a class="reference internal" href="word_mimicry.html">word_mimicry module</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#">fflow module</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#features.fflow.get_forward_flow"><code class="docutils literal notranslate"><span class="pre">get_forward_flow()</span></code></a></li>
</ul>
Expand Down Expand Up @@ -132,7 +136,7 @@
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="named_entity_recognition_features.html" class="btn btn-neutral float-left" title="named_entity_recognition_features module" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="word_mimicry.html" class="btn btn-neutral float-left" title="word_mimicry module" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="burstiness.html" class="btn btn-neutral float-right" title="burstiness module" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>

Expand Down
4 changes: 4 additions & 0 deletions docs/build/html/features/hedge.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
<li class="toctree-l3"><a class="reference internal" href="readability.html">readability module</a></li>
<li class="toctree-l3"><a class="reference internal" href="textblob_sentiment_analysis.html">textblob_sentiment_analysis module</a></li>
<li class="toctree-l3"><a class="reference internal" href="named_entity_recognition_features.html">named_entity_recognition_features module</a></li>
<li class="toctree-l3"><a class="reference internal" href="politeness_v2.html">politeness_v2 module</a></li>
<li class="toctree-l3"><a class="reference internal" href="politeness_v2_helper.html">politeness_v2_helper module</a></li>
<li class="toctree-l3"><a class="reference internal" href="reddit_tags.html">reddit_tags module</a></li>
<li class="toctree-l3"><a class="reference internal" href="word_mimicry.html">word_mimicry module</a></li>
<li class="toctree-l3"><a class="reference internal" href="fflow.html">fflow module</a></li>
</ul>
</li>
Expand Down
8 changes: 8 additions & 0 deletions docs/build/html/features/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@
<li class="toctree-l3"><a class="reference internal" href="readability.html">readability module</a></li>
<li class="toctree-l3"><a class="reference internal" href="textblob_sentiment_analysis.html">textblob_sentiment_analysis module</a></li>
<li class="toctree-l3"><a class="reference internal" href="named_entity_recognition_features.html">named_entity_recognition_features module</a></li>
<li class="toctree-l3"><a class="reference internal" href="politeness_v2.html">politeness_v2 module</a></li>
<li class="toctree-l3"><a class="reference internal" href="politeness_v2_helper.html">politeness_v2_helper module</a></li>
<li class="toctree-l3"><a class="reference internal" href="reddit_tags.html">reddit_tags module</a></li>
<li class="toctree-l3"><a class="reference internal" href="word_mimicry.html">word_mimicry module</a></li>
<li class="toctree-l3"><a class="reference internal" href="fflow.html">fflow module</a></li>
</ul>
</li>
Expand Down Expand Up @@ -126,6 +130,10 @@ <h2>Utterance- (Chat) Level Features<a class="headerlink" href="#utterance-chat-
<li class="toctree-l1"><a class="reference internal" href="readability.html">readability module</a></li>
<li class="toctree-l1"><a class="reference internal" href="textblob_sentiment_analysis.html">textblob_sentiment_analysis module</a></li>
<li class="toctree-l1"><a class="reference internal" href="named_entity_recognition_features.html">named_entity_recognition_features module</a></li>
<li class="toctree-l1"><a class="reference internal" href="politeness_v2.html">politeness_v2 module</a></li>
<li class="toctree-l1"><a class="reference internal" href="politeness_v2_helper.html">politeness_v2_helper module</a></li>
<li class="toctree-l1"><a class="reference internal" href="reddit_tags.html">reddit_tags module</a></li>
<li class="toctree-l1"><a class="reference internal" href="word_mimicry.html">word_mimicry module</a></li>
<li class="toctree-l1"><a class="reference internal" href="fflow.html">fflow module</a></li>
</ul>
</div>
Expand Down
4 changes: 4 additions & 0 deletions docs/build/html/features/info_exchange_zscore.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
<li class="toctree-l3"><a class="reference internal" href="readability.html">readability module</a></li>
<li class="toctree-l3"><a class="reference internal" href="textblob_sentiment_analysis.html">textblob_sentiment_analysis module</a></li>
<li class="toctree-l3"><a class="reference internal" href="named_entity_recognition_features.html">named_entity_recognition_features module</a></li>
<li class="toctree-l3"><a class="reference internal" href="politeness_v2.html">politeness_v2 module</a></li>
<li class="toctree-l3"><a class="reference internal" href="politeness_v2_helper.html">politeness_v2_helper module</a></li>
<li class="toctree-l3"><a class="reference internal" href="reddit_tags.html">reddit_tags module</a></li>
<li class="toctree-l3"><a class="reference internal" href="word_mimicry.html">word_mimicry module</a></li>
<li class="toctree-l3"><a class="reference internal" href="fflow.html">fflow module</a></li>
</ul>
</li>
Expand Down
4 changes: 4 additions & 0 deletions docs/build/html/features/lexical_features_v2.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@
<li class="toctree-l3"><a class="reference internal" href="readability.html">readability module</a></li>
<li class="toctree-l3"><a class="reference internal" href="textblob_sentiment_analysis.html">textblob_sentiment_analysis module</a></li>
<li class="toctree-l3"><a class="reference internal" href="named_entity_recognition_features.html">named_entity_recognition_features module</a></li>
<li class="toctree-l3"><a class="reference internal" href="politeness_v2.html">politeness_v2 module</a></li>
<li class="toctree-l3"><a class="reference internal" href="politeness_v2_helper.html">politeness_v2_helper module</a></li>
<li class="toctree-l3"><a class="reference internal" href="reddit_tags.html">reddit_tags module</a></li>
<li class="toctree-l3"><a class="reference internal" href="word_mimicry.html">word_mimicry module</a></li>
<li class="toctree-l3"><a class="reference internal" href="fflow.html">fflow module</a></li>
</ul>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="fflow module" href="fflow.html" />
<link rel="next" title="politeness_v2 module" href="politeness_v2.html" />
<link rel="prev" title="textblob_sentiment_analysis module" href="textblob_sentiment_analysis.html" />
</head>

Expand Down Expand Up @@ -69,6 +69,10 @@
<li class="toctree-l4"><a class="reference internal" href="#features.named_entity_recognition_features.train_spacy_ner"><code class="docutils literal notranslate"><span class="pre">train_spacy_ner()</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="politeness_v2.html">politeness_v2 module</a></li>
<li class="toctree-l3"><a class="reference internal" href="politeness_v2_helper.html">politeness_v2_helper module</a></li>
<li class="toctree-l3"><a class="reference internal" href="reddit_tags.html">reddit_tags module</a></li>
<li class="toctree-l3"><a class="reference internal" href="word_mimicry.html">word_mimicry module</a></li>
<li class="toctree-l3"><a class="reference internal" href="fflow.html">fflow module</a></li>
</ul>
</li>
Expand Down Expand Up @@ -213,7 +217,7 @@
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="textblob_sentiment_analysis.html" class="btn btn-neutral float-left" title="textblob_sentiment_analysis module" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="fflow.html" class="btn btn-neutral float-right" title="fflow module" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="politeness_v2.html" class="btn btn-neutral float-right" title="politeness_v2 module" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>

<hr/>
Expand Down
4 changes: 4 additions & 0 deletions docs/build/html/features/other_lexical_features.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@
<li class="toctree-l3"><a class="reference internal" href="readability.html">readability module</a></li>
<li class="toctree-l3"><a class="reference internal" href="textblob_sentiment_analysis.html">textblob_sentiment_analysis module</a></li>
<li class="toctree-l3"><a class="reference internal" href="named_entity_recognition_features.html">named_entity_recognition_features module</a></li>
<li class="toctree-l3"><a class="reference internal" href="politeness_v2.html">politeness_v2 module</a></li>
<li class="toctree-l3"><a class="reference internal" href="politeness_v2_helper.html">politeness_v2_helper module</a></li>
<li class="toctree-l3"><a class="reference internal" href="reddit_tags.html">reddit_tags module</a></li>
<li class="toctree-l3"><a class="reference internal" href="word_mimicry.html">word_mimicry module</a></li>
<li class="toctree-l3"><a class="reference internal" href="fflow.html">fflow module</a></li>
</ul>
</li>
Expand Down
4 changes: 4 additions & 0 deletions docs/build/html/features/politeness_features.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
<li class="toctree-l3"><a class="reference internal" href="readability.html">readability module</a></li>
<li class="toctree-l3"><a class="reference internal" href="textblob_sentiment_analysis.html">textblob_sentiment_analysis module</a></li>
<li class="toctree-l3"><a class="reference internal" href="named_entity_recognition_features.html">named_entity_recognition_features module</a></li>
<li class="toctree-l3"><a class="reference internal" href="politeness_v2.html">politeness_v2 module</a></li>
<li class="toctree-l3"><a class="reference internal" href="politeness_v2_helper.html">politeness_v2_helper module</a></li>
<li class="toctree-l3"><a class="reference internal" href="reddit_tags.html">reddit_tags module</a></li>
<li class="toctree-l3"><a class="reference internal" href="word_mimicry.html">word_mimicry module</a></li>
<li class="toctree-l3"><a class="reference internal" href="fflow.html">fflow module</a></li>
</ul>
</li>
Expand Down
Loading
Loading