The xAIF library provides two export mechanisms: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.
get_csv for exporting argument or locution pairs as a pandas DataFrame ready for downstream analysis or machine-learning pipelines, and XAIF.format for serialising a freshly assembled set of components into a standards-compliant xAIF JSON string.
get_csv(relation_type)
Controls which pair type to export:
"argument-relation"— pairs I-nodes through RA, CA, or MA relation nodes. Unrelated I-node pairs are included withrelation="None"."locution"— pairs L-nodes with their downstream I-nodes through YA nodes. Useful for illocution classification tasks.
pd.DataFrame with five columns:
| Column | Type | Description |
|---|---|---|
proposition1_id | int | nodeID of the source node |
proposition1_text | str | Text content of the source node |
proposition2_id | int | nodeID of the target node |
proposition2_text | str | Text content of the target node |
relation | str | Relation node text ("Default Inference", "Default Conflict", "Default Rephrase", or "None") |
Example
get_csv always includes all proposition pairs — both related and unrelated — in the returned DataFrame. Unrelated pairs are labelled relation="None". This design means the DataFrame can be used directly as a binary classification training set without any additional negative-sampling step.XAIF.format(...) (static)
aif and x_aif dicts in place before serialising, so pass fresh empty dicts (the defaults) unless you intentionally want to merge into an existing structure.
This is called internally by initilise_empty when an AIF object is constructed from plain text, but it can be invoked directly whenever you need to serialise a custom-assembled set of components.
List of node dicts. Each dict must have
nodeID, text, and type keys.List of edge dicts. Each dict must have
edgeID, fromID, and toID keys.List of locution dicts. Each dict must have
nodeID and personID keys.Scheme fulfilment entries, or an empty list if none apply.
Descriptor fulfilment entries, or an empty list if none apply.
List of participant dicts. Each dict must have
participantID, firstname, and surname keys.OVA metadata dict. Pass an empty dict
{} if OVA metadata is not required.The HTML-annotated source text string stored under
xaif["text"]["txt"]. Span tags carry the nodeID of each corresponding L-node.Set to
True to mark the document as a dialogue. Stored under xaif["dialog"]. Defaults to False.An existing dict to populate as the
AIF section. Defaults to a new empty dict.An existing dict to populate as the top-level xAIF document. Defaults to a new empty dict.
