The AMT data model
An AMT file describes a graph whose edges hold only to a degree. This page shows how such a file is put together: the building blocks, the axioms that derive new edges, and a small Turtle example for each. Every example on this page is parsed and validated against the SHACL shapes whenever the test suite runs.
All examples assume these prefixes. ex: stands for your own data.
@prefix amt: <http://academic-meta-tool.xyz/vocab#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix fw: <http://w3id.org/fw_ontology/> .
@prefix ex: <http://example.org/> .
Concepts and individuals
A Concept is a class of things in your domain, such as Person or Place. Individuals are linked to
their Concept with amt:instanceOf. The optional amt:placeholder tells an editor what a label
should look like.
ex:Person a amt:Concept ;
rdfs:label "Person" ;
amt:placeholder "Surname, forename" .
ex:ada amt:instanceOf ex:Person ;
rdfs:label "Ada Lovelace" .
ex:charles amt:instanceOf ex:Person ;
rdfs:label "Charles Babbage" .
Roles
A Role is a typed relation between two Concepts, the label of an edge. It declares its domain and range.
ex:connectedWith a amt:Role ;
rdfs:label "is connected with" ;
rdfs:domain ex:Person ;
rdfs:range ex:Person .
Weighted edges
An edge is written as a reified statement, so that the weight has something to attach to. Four parts are required:
a subject, a role, an object and a weight between 0 and 1 in amt:weight. This is the core, a quadruple.
[] rdf:subject ex:ada ;
rdf:predicate ex:connectedWith ;
rdf:object ex:charles ;
amt:weight "0.8"^^xsd:decimal .
The FW ontology (prefix fw:) adds two optional parts, which make
the edge a hextuple: fw:hasType says what kind of fuzziness the weight expresses and
fw:hasMethod says how the weight was obtained. A quadruple stays valid; nothing has to be added.
[] rdf:subject ex:ada ;
rdf:predicate ex:connectedWith ;
rdf:object ex:charles ;
amt:weight "0.5"^^xsd:decimal ;
fw:hasType fw:Uncertainty ;
fw:hasMethod fw:EqualShareRule ;
fw:derivedFrom [ a fw:TextEvidence ;
fw:sourceString "Letter damaged: Charles or Mary." ] .
Type and method
| Part | Values | Meaning |
|---|---|---|
fw:hasType | fw:Vagueness | the relation holds to a degree (the default) |
fw:Uncertainty | the relation holds or not, and we do not know which | |
fw:FuzzinessWobbliness | both at once; also the type of an inferred edge whose antecedents differ in type | |
fw:Certainty | the relation holds fully (weight 1.0); never assumed, only if the data says so | |
fw:hasMethod | for example fw:EqualShareRule | how the weight was obtained; for an inferred edge, the logic that computed it |
- Default. A statement without
fw:hasTypeis a vagueness statement, also at weight 1. The engine does not write this default into its output unless it was in the input. - Evidence.
fw:derivedFrom(for example afw:TextEvidencewith afw:sourceString) is optional and is passed through unchanged. - Another name for the weight.
fw:hasDegreeOfConnectionis read likeamt:weight; the engine writesamt:weight. - Inferred edges. A role chain gives the edge the logic as its method and the common type of the antecedents,
or
fw:FuzzinessWobblinessif they differ;fw:Certaintyadds no fuzziness, so it is left out as soon as another type is present (a chain of certain edges stays certain). An inverse or subsumed edge has no method and takes the type of the edge it comes from. If several paths lead to the same edge, the highest weight wins; at equal weight the choice is fixed, so the result does not change between runs.
Axioms
Axioms are statements about roles, not about individuals. Inference axioms derive new edges, integrity axioms describe edges that must not exist.
Role chain axiom
If a chain of edges exists, an edge between its two ends is inferred. Its weight is computed from the weights along the
chain by the fuzzy logic named in amt:logic; that logic is also the method of the new edge (type and method). amt:antecedents takes a list of any length; the
older two-step form with amt:antecedent1 and amt:antecedent2 is still valid.
ex:RCA a amt:RoleChainAxiom ;
amt:antecedents ( ex:connectedWith ex:connectedWith ) ;
amt:consequent ex:connectedWith ;
amt:logic amt:ProductLogic .
ex:RCA2 a amt:RoleChainAxiom ;
amt:antecedent1 ex:connectedWith ;
amt:antecedent2 ex:connectedWith ;
amt:consequent ex:connectedWith ;
amt:logic amt:GoedelLogic .
Parametrised operators take their parameter from amt:logicParameter:
ex:RCA3 a amt:RoleChainAxiom ;
amt:antecedents ( ex:connectedWith ex:connectedWith ) ;
amt:consequent ex:connectedWith ;
amt:logic amt:HamacherProduct ;
amt:logicParameter "0.5"^^xsd:decimal .
Inverse axiom
An edge with the antecedent role implies the reverse edge with the inverse role, at the same weight. Its type is that of the edge it comes from; it has no method.
ex:interestOf a amt:Role ;
rdfs:label "is interest of" ;
rdfs:domain ex:Person ;
rdfs:range ex:Person .
ex:hasInterest a amt:Role ;
rdfs:label "has interest" ;
rdfs:domain ex:Person ;
rdfs:range ex:Person .
ex:IA a amt:InverseAxiom ;
amt:antecedent ex:interestOf ;
amt:inverse ex:hasInterest .
Subsumption axiom
One role is finer than another: every edge with the sub-role is also an edge with the super-role, at the same weight. Only the direct step is declared; the engine computes the transitive closure.
ex:before a amt:Role ;
rdfs:label "before" ;
rdfs:domain ex:Person ;
rdfs:range ex:Person .
ex:older a amt:Role ;
rdfs:label "older" ;
rdfs:domain ex:Person ;
rdfs:range ex:Person .
ex:SUB a amt:SubsumptionAxiom ;
amt:subRole ex:before ;
amt:superRole ex:older .
Disjoint axiom
Two roles must not hold between the same pair of nodes. The engine reports a violation if they do.
ex:friendOf a amt:Role ;
rdfs:label "friend of" ;
rdfs:domain ex:Person ;
rdfs:range ex:Person .
ex:enemyOf a amt:Role ;
rdfs:label "enemy of" ;
rdfs:domain ex:Person ;
rdfs:range ex:Person .
ex:DA a amt:DisjointAxiom ;
amt:role1 ex:friendOf ;
amt:role2 ex:enemyOf .
Self-disjoint axiom
A role must not hold between a node and itself.
ex:SDA a amt:SelfDisjointAxiom ;
amt:role ex:enemyOf .
Fuzzy logics
The operators below combine the weights along a chain. Which one fits depends on how you want the length of a chain to
count; the vocabulary page has a usage hint for each. Each operator is also a
fw:PropagationMethod of the FW ontology.
| Operator | Formula | Arity |
|---|---|---|
amt:EinsteinProduct | (x * y) / (2 - (x + y - x * y)) | binary |
amt:GeometricMean | (x_1 * x_2 * ... * x_n)^(1/n) | n-ary |
amt:GoedelLogic | min(x, y) | binary |
amt:HamacherProduct | (x * y) / (gamma + (1 - gamma) * (x + y - x * y)) | binary |
amt:LukasiewiczLogic | max(x + y - 1, 0) | binary |
amt:ProductLogic | x * y | binary |
Checking a file
The shapes in ontology/amt-shapes.ttl
check that weights lie in [0, 1], that axioms have the properties they need and that role chains do not mix the two
forms. The AMT engine runs them before it loads a file.