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.
add_component is the primary mutation method on the AIF class. It dispatches to a private implementation method based on the component_type argument, keeping the public API surface minimal while supporting four distinct graph-building operations. All changes are applied directly to the in-memory aif dict and are immediately reflected in aif.nodes, aif.locutions, and aif.participants.
Signature
Selects which kind of component to add. Must be one of:
"locution"— add a new L-node and locution entry"proposition"— add an I-node and YA-node linked to an existing L-node"argument_relation"— add an RA, CA, or MA relation node between two I-nodes"segment"— split an existing L-node into multiple new L-nodes
component_type="locution"
Adds a new L-node to AIF["nodes"], a corresponding entry to AIF["locutions"], and — if the named speaker is not already present — appends the speaker to AIF["participants"].
kwargs
The spoken text to store on the L-node.
Full name of the speaker in
"Firstname Lastname" format. The string is split on whitespace to produce firstname and surname fields in the participants list.Example
component_type="proposition"
Links an existing L-node to a new propositional content (I-node) via a YA-node labelled "Default Illocuting". Creates two new nodes and two directed edges: L → YA and YA → I.
kwargs
The
nodeID of the L-node that the proposition is derived from. Must already exist in AIF["nodes"].The propositional content to store on the new I-node.
Example
component_type="argument_relation"
Adds a relation node (RA, CA, or MA) between two existing I-nodes and creates two directed edges: iNode_ID1 → relation_node and relation_node → iNode_ID2. The default node text is derived from relation_type unless overridden by AR_text.
relation_type | Node type | Default text |
|---|---|---|
RA | RA | "Default Inference" |
CA | CA | "Default Conflict" |
MA | MA | "Default Rephrase" |
kwargs
One of
"RA" (inference / support), "CA" (conflict / attack), or "MA" (rephrase / equivalence).The
nodeID of the source I-node (the premise or attacking proposition).The
nodeID of the target I-node (the conclusion or proposition being attacked).Accepted by the signature but not used — the relation node text is always set from
relation_type via the internal if/elif chain ("Default Inference" for RA, "Default Conflict" for CA, "Default Rephrase" for MA). Any value passed here will be silently overwritten.Example
component_type="segment"
Splits an existing L-node into multiple new L-nodes — one per string in segments — all attributed to the same speaker as the original L-node. After adding the new nodes, it calls remove_entry to delete the original L-node together with its associated I-node, YA-node, edges, and locution entry.
kwargs
The
nodeID of the L-node to split. This node is removed once the new segment nodes are created.A list of text strings, one per new L-node to create. Each string becomes the
text field of a new L-node, and a corresponding locution entry is added with the same personID as the original.