{{'''
  SELECT ?sub (sample(?p) as ?pred) (sample(?o) as ?obj) (max(?s) as ?score)
#  (group_concat(distinct ?type; separator="||") as ?types)
  WHERE {
      (?o ?s) text:search ?query .
      ?sub ?p ?o .
#  OPTIONAL {
#    ?sub rdf:type ?type.
#    }
  } group by ?sub having (max(?s) = ?score) ORDER BY DESC(?score)
LIMIT 10''' | query(values={"query":rdflib.Literal(args['query'])}) | tojson }}
