Skip to main content

ALIGN, a computational tool for multi-level language analysis (optimized for Python 3.10)

align is a Python library for extracting quantitative, reproducible metrics of multi-level alignment between two speakers in naturalistic language corpora. The method was introduced in "ALIGN: Analyzing Linguistic Interactions with Generalizable techNiques" (Duran, Paxton, & Fusaroli, 2019; Psychological Methods).

Installation

align may be downloaded directly using pip.

To download the stable version released on PyPI:

pip install align

To download directly from our GitHub repo:

pip install git+https://github.com/nickduran/align-linguistic-alignment.git

Additional tools required for some align options

The Google News pre-trained word2vec vectors (GoogleNews-vectors-negative300.bin) and the Stanford part-of-speech tagger (stanford-postagger-full-2020-11-17) are required for some optional align parameters but must be downloaded separately.

Tutorials

We created Jupyter Notebook tutorials to provide an easily accessible step-by-step walkthrough on how to use align. Below are descriptions of the current tutorials that can be found in the examples directory within this repository. If unfamiliar with Jupyter Notebooks, instructions for installing and running can be found here: http://jupyter.org/install. We recommend installing Jupyter using Anaconda. Anaconda is a widely-used Python data science platform that helps streamline workflows. A major advantage is that Anaconda also makes it easy to set up unique Python environments - which may be necessary to run align and the tutorials given align is currently optimized for Python 3.

  • Jupyter Notebook 1: CHILDES

    • This tutorial walks users through an analysis of conversations from a single English corpus from the CHILDES database (MacWhinney, 2000)---specifically, Kuczaj’s Abe corpus (Kuczaj, 1976). We analyze the last 20 conversations in the corpus in order to explore how ALIGN can be used to track multi-level linguistic alignment between a parent and child over time, which may be of interest to developmental language researchers. Specifically, we explore how alignment between a parent and a child changes over a brief span of developmental trajectory.
  • Jupyter Notebook 2: Devil's Advocate

    • This tutorial walks users throught the analysis reported in (Duran, Paxton, & Fusaroli, 2019). The corpus consists of 94 written transcripts of conversations, lasting eight minutes each, collected from an experimental study of truthful and deceptive communication. The goal of the study was to examine interpersonal linguistic alignment between dyads across two conversations where participants either agreed or disagreed with each other (as a randomly assigned between-dyads condition) and where one of the conversations involved the truth and the other deception (as a within-subjects condition).

We are in the process of adding more tutorials and would welcome additional tutorials by interested contributors.

Attribution

If you find the package useful, please cite our manuscript:

Duran, N., Paxton, A., & Fusaroli, R. (2019). ALIGN: Analyzing Linguistic Interactions with Generalizable techNiques. Psychological Methods. http://dynamicog.org/papers/

Licensing of example data

  • CHILDES

    Kuczaj, S. (1977). The acquisition of regular and irregular past tense forms. Journal of Verbal Learning and Verbal Behavior, 16, 589–600.

  • Devil's Advocate

    • The complete de-identified dataset of raw conversational transcripts is hosted on a secure protected-access repository provided by the Inter-university Consortium for Political and Social Research (ICPSR). Please click on the link to access: http://dx.doi.org/10.3886/ICPSR37124.v1. Due to the requirements of our IRB, please note that users interested in obtaining these data must complete a Restricted Data Use Agreement, specify the reason for the request, and obtain IRB approval or notice of exemption for their research.

    Duran, Nicholas, Alexandra Paxton, and Riccardo Fusaroli. Conversational Transcripts of Truthful and Deceptive Speech Involving Controversial Topics, Central California, 2012. ICPSR37124-v1. Ann Arbor, MI: Inter-university Consortium for Political and Social Research [distributor], 2018-08-29.

Metadata

Release files for align 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for align 0.1.1
File Size Uploaded Provenance Actions
align-0.1.1.tar.gz 2.5 MB Without provenance Details for align-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for align 0.1.1
File Interpreter ABI Platform Actions
align-0.1.1-py3-none-any.whl Python 3 none any Details for align-0.1.1-py3-none-any.whl

Total release size: 4.9 MB

Release files / align-0.1.1.tar.gz

Download URL align-0.1.1.tar.gz
Size 2.5 MB
Tags Source
SHA-256 checksum
How to use checksums
32e1e9c9b03d3dba25ff7d8ac8cf6fd7a6266ec55dc9925281f9a42198e1ea71
BLAKE2b-256 checksum
How to use checksums
e6418d336f52b84d59c5f781c03e8e0c59ca7fe984618d08c4c1947cd4881746
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.7.13

Release files / align-0.1.1-py3-none-any.whl

Download URL align-0.1.1-py3-none-any.whl
Size 2.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
53dd8e452f97b6caf4756f053cda07d2589e87b25fbdb89f4e23a8e750c1ff60
BLAKE2b-256 checksum
How to use checksums
c29583a816e66755db8e8b18430d47a4225c67ba3cb9717c58baea1f4e06560c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.7.13

Security for align 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page