Building an AAT (Agent-Action-Target) graph
The aat package defines a reductive model of natural language syntax focusing only on Agent-Action-Target relations, instantiated in an AATGraph. You can construct an AATGraph from an arsgrammatica analysis with the attgraph function.
Load a saved analysis, or analyze some Latin text:
from arsgrammatica import analyze_string
sentences, results = analyze_string("Troia et huic loco nomen est.", citation="Livy 1.1.4:")You can then construct an AATGraph from the resulting sentences and analyses.
from arsgrammatica import attgraph
graph, warnings = attgraph(sentences, results)For more information about AAT graphs, see the aat github repository.
A graph-theoretic note
AAT graphs (like UD graphs) are guaranteed to be trees. While arsgrammatica’s syntax graphs tend to approximate a tree structure, they may include doubly linked nodes (like que in this example), and are not guaranteed to be acyclic.
AAT graphs, like arsgrammatica’s graphs, are directed towards root-level verbal elements.