xAIF is designed from the ground up for dialogue. Every locution in the argument graph is attributed to a named participant, making speaker identity a first-class part of the data model. This means you can not only reason about what was said and how propositions relate to each other, but also who said what — which is essential for applications like debate analysis, meeting transcription, and argument mining over conversational data.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.
The Three-Way Mapping
In an xAIF dialogue graph, each spoken turn is represented through three interconnected structures:- L-node (
"type": "L") — the raw text of the utterance, stored inAIF["nodes"]. - Locution entry — a record in
AIF["locutions"]that maps anodeID(pointing to the L-node) to apersonID(pointing to a participant). - Participant entry — a record in
AIF["participants"]containing theparticipantID,firstname, andsurnameof the speaker.
add_component, xAIF populates all three automatically. When you load an existing xAIF structure, these three lists are already populated and ready to query.
Checking for Dialogue
Before running any dialogue-specific logic, you can verify that the loaded structure actually contains locution nodes:AIF["nodes"] and returns True as soon as it finds any node with "type": "L". It returns False for graphs that contain only I-nodes, RA-nodes, and other non-locution types (such as graphs exported from OVA without dialogue data).
Looking Up a Speaker
Given any L-node ID, you can retrieve the name and ID of the participant who spoke it:get_speaker builds an internal mapping from every locution entry’s nodeID to its corresponding participant’s full name, then performs a lookup. It returns a tuple of (full_name, participantID):
full_name— a string in the form"Firstname Surname".participantID— the integer or string ID fromAIF["participants"].
("None None", "None").
Multi-Speaker Example
The example below loads a two-speaker xAIF graph representing a short exchange about SNP party disagreements, then uses the dialogue methods to inspect the structure.Building a Dialogue from Turns
When constructing a dialogue programmatically rather than loading an existing structure,create_turn_entry is used internally by the AIF initialiser to populate nodes, locutions, and participants from a list of (speaker_name, text) tuples.
When called with dialogue=True, the method iterates over each (speaker_name, text) pair and:
- Creates an L-node for the turn text.
- Appends a locution entry mapping the L-node to the speaker’s person ID.
- Appends a participant entry if that speaker has not been seen before.
- Increments both the node ID and person ID counters for the next turn.
dialogue=False path (used when AIF is initialised with a plain string) produces a single L-node attributed to a synthetic "Default Speaker" participant.
