How-To
Practical guides for working with AMT files: build one, check it, and understand what the messages mean. Each guide starts from a small example you can copy.
Build an AMT file
What an AMT file consists of, a complete file to start from, and how to turn existing RDF into AMT with a SPARQL CONSTRUCT query.
Check an AMT file
Run the checks, read what they say, and fix it. Every message is explained with the IRI it names, what causes it and what to add.
Run it and look at the result
From nothing to a graph in your browser: clone the runner, where to put your file, which command to type, where the result appears.
The short version
- Declare concepts (
ex:Coin a amt:Concept ; rdfs:label "Coin"). - Make every end of every edge a node (
ex:c1 amt:instanceOf ex:Coin), including the things your edges point to. - Write edges as a statement with
rdf:subject,rdf:predicate,rdf:objectandamt:weight. If it matters, addfw:hasTypeandfw:hasMethod. - Check before you reason:
python run_amt.py my.ttl --check-only. - Run and open the graph:
python run_amt.py my.ttl, thenout\latest\my.html.
Which tool for which job
| You want to… | Use |
|---|---|
| try a file once, without installing anything but Python and git | amt-runner → python run_amt.py my.ttl |
| check a file quickly while you build it | python run_amt.py my.ttl --check-only (or amt-runner my.ttl --check-only with the engine installed) |
| run it inside your own Python project | pip install -e . from amt-engine, then from amt import load_amt, diagnose |
| look at the graph and the inferred edges | the HTML file of a run, or the Explorer in your browser (step by step) |
The two things called amt-runner: the repository amt-runner is a small wrapper
(run_amt.py) that fetches the engine for you; the engine itself also has a command amt-runner.
Both accept the same options.