TheDocumentation 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.
AIF class is the primary entry point for working with xAIF structures. It wraps an xAIF JSON document and exposes methods for adding components, querying the graph, and exporting data. Whether you are starting from a plain text string or loading a fully structured xAIF dict, AIF normalises the input into a consistent in-memory representation that all other methods operate on.
Import
Constructor
Either an xAIF-compliant dict or a plain text string.
- dict — The constructor reads the
AIFkey directly and populates all instance attributes from it. The dict must contain at minimum anAIFkey whose value hasnodes,edges,locutions, andparticipantssub-keys. - str — The constructor calls
initilise_emptyinternally, which creates one L-node and one locution attributed to"Default Speaker"from the provided text, then parses the resulting JSON back into a dict. This is the fastest way to bootstrap a new argument graph from raw text.
Instance Attributes
After construction the following attributes are available on everyAIF instance. They are live references into the underlying dict — mutations via add_component or remove_entry are immediately reflected.
The full xAIF document, including all top-level keys (
AIF, dialog, ova, text).The
AIF section of the document — equivalent to xaif["AIF"]. Contains nodes, edges, locutions, participants, schemefulfillments, and descriptorfulfillments.Shortcut to
aif["nodes"]. Each entry is a dict with keys nodeID, text, and type (one of "L", "I", "YA", "RA", "CA", "MA").Shortcut to
aif["locutions"]. Each entry is a dict with nodeID (the L-node this locution maps to) and personID (the participant who uttered it).Shortcut to
aif["participants"]. Each entry is a dict with participantID, firstname, and surname.Initialisation Examples
Related Pages
add_component
Add locutions, propositions, argument relations, and segments to a graph.
Query Methods
Validate structure, look up speakers, traverse edges, and manage node IDs.
Export Methods
Export argument relations as DataFrames and serialise graphs to JSON.
