Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/arg-tech/xaif/llms.txt

Use this file to discover all available pages before exploring further.

xaif is a Python library for working with the Extended Argument Interchange Format (xAIF) — a JSON-based standard for representing structured argument graphs. Built on top of the Argument Interchange Format (AIF) and grounded in Inference Anchoring Theory (IAT), xAIF extends the original AIF specification to support the full lifecycle of computational argument mining: from raw conversational text to richly annotated graphs of propositions, locutions, and the relations between them. Where AIF imposes strict structural constraints (exactly one consequent per relation, at least one antecedent, no loose intermediate annotations), xAIF deliberately relaxes those constraints to accommodate incremental and partial annotation — making it a practical interlingua for every module in an open argument mining pipeline.

AIF vs. xAIF

The Argument Interchange Format (AIF) provides a rigorous ontology for representing argumentative knowledge as a directed graph of nodes and edges. While AIF is well-suited to complete, formally specified arguments, it can be too restrictive for real-world argument mining scenarios where structures are assembled piece by piece or where intermediate annotations must coexist with finalized ones. xAIF addresses these limitations in four concrete ways:
DimensionAIFxAIF
UnderspecificationRelations must have ≥1 antecedent and exactly 1 consequentRelaxed — partial structures are valid
OverspecificationNo provision for extra structural markupAdditional discourse annotations are supported
SerialisationSchema-agnosticCanonical JSON format, tool-friendly
Ecosystem roleStand-alone formatInterlingua for the arg-tech open argument mining framework
The theoretical foundations of xAIF are rooted in Inference Anchoring Theory (IAT), as developed by Budzynska, Janier, Reed, and colleagues. IAT treats a discourse as a network of argumentative moves anchored to the locutions that carry them.

Argumentative Discourse Units (ADUs)

In the IAT framework that underpins xAIF, a text — whether a debate transcript, an article, or a chat log — is decomposed into Argumentative Discourse Units (ADUs). An ADU is the smallest text span that (a) carries propositional content anchored to a locution or transition and (b) stands in an inferential, conflicting, or rephrasing relation to at least one other proposition. Consider a simple exchange:
Bob:    Please, be careful with the table.
Worker: Why?
Bob:    It has a glass element, so it could break.
The ADUs extracted from this dialogue are:
[
    "Bob: Please, be careful with the table.",
    "Worker: Why?",
    "Bob: It has a glass element,",
    "Bob: so it could break.",
]
Notice that Bob’s second turn is split into two ADUs — "It has a glass element" and "so it could break" — because they carry distinct propositional content that stands in an inferential relation to each other. ADUs are not necessarily sentences; they are the minimum semantically self-contained chunks that the argument graph operates on. Each ADU surfaces in xAIF as one of two node types:
  • L-nodes (Locution nodes) — the raw, verbatim text as spoken by a participant, including speaker attribution.
  • I-nodes (Information nodes) — the processed, context-resolved, “neutral-semantics” version of the same content, stripped of stylistic artefacts and with pronouns resolved.
L-nodes and I-nodes have a one-to-one correspondence and are linked through YA-nodes (illocutionary anchoring nodes), which express the illocutionary force of the connection (e.g., Default Illocuting, Asserting). Argument relations between I-nodes are encoded as intermediate scheme nodes:
  • RA nodes — Inference / Support (e.g., Default Inference)
  • CA nodes — Conflict / Attack (e.g., Default Conflict)
  • MA nodes — Rephrase / Paraphrase (e.g., Default Rephrase)

Key Features

xAIF Format Overview

Understand the full JSON structure of xAIF — top-level keys, the AIF block, and optional extension fields used by tools in the arg-tech ecosystem.

Node Types Reference

Detailed reference for every node type: L, I, YA, RA, CA, MA, and TA — including their fields, roles in the graph, and how they connect via edges.

Building Argument Graphs

Step-by-step guide to constructing argument graphs programmatically using AIF.add_component() — from initialising with raw text to wiring up propositions and relations.

Exporting Data

Learn how to export argument structures to pandas DataFrames using AIF.get_csv(), covering both argument-relation and locution export modes.

Package Information

xaif is published on PyPI and can be installed with a single pip command. It requires Python 3.8 or later and is released under the MIT License.
PyPI packagexaif
Version0.3.6
LicenseMIT
Python>= 3.8
Sourcegithub.com/arg-tech/xaif
xaif depends on pandas for tabular export. No other runtime dependencies are required beyond the Python standard library.

Build docs developers (and LLMs) love