Skip to content

Argument Interchange Format

awknox-dstl edited this page Oct 19, 2021 · 1 revision

SPARQL

collecting some potentially useful SPARQL queries...

Argument map as edge list

Each edge is an S-node linked to a premise or conclusion.

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix aif: <http://www.arg.dundee.ac.uk/aif#>

select distinct ?node1 ?type1 ?claim1 ?node2 ?type2 ?claim2

where {
  {
  ?node1 rdf:type ?type1 .
  ?node2 rdf:type ?type2 .
  ?node1 aif:Conclusion ?node2 .
  
  OPTIONAL { ?node1 aif:claimText ?claim1 }
  OPTIONAL { ?node2 aif:claimText ?claim2 }
  }
  union
  {
  ?node1 rdf:type ?type1 .
  ?node2 rdf:type ?type2 .
  ?node2 aif:Premise ?node1 .
  
  OPTIONAL { ?node1 aif:claimText ?claim1 }
  OPTIONAL { ?node2 aif:claimText ?claim2 }
  }
  
}
Clone this wiki locally