(ql:quickload :trivia)

;; who is <name>, <name>, etc. -> (entity_lookup EntityTypes.PERSON <name>)
;; synonyms: who, what, tell, show

(defun process-query (query)
  (let ((ret '()))
    ;; who..
    ;; where...
    (let ((entities (entity-uris:
                     (print "test trivia matching")))))))

(trivia:match '(:a (3 4) 5)
  ((list :a (list _ c) _)
   c))

(setf json-as-list
  '((:HEAD (:VARS "s" "p" "o"))
    (:RESULTS
     (:BINDINGS
      ((:S (:TYPE . "uri") (:VALUE . "#Dump"))
       (:P (:TYPE . "uri") (:VALUE . "#license"))
       (:O
        (:TYPE . "uri")
        (:VALUE . "/")))
      ((:S (:TYPE . "uri") (:VALUE . "#Dump"))
       (:P (:TYPE . "uri") (:VALUE . ""))
       (:O (:TYPE . "literal") (:VALUE . "1.0.0")))))))

(trivia:match json-as-list
  ((list (list :HEAD (list* :VARS (list* v)))
         (list :RESULTS
               (list* :BINDINGS (list* bindings))))
   (list v bindings)))

 who is <name>, <name>, etc. -> (entity_lookup EntityTypes.PERSON <name>)
 synonyms: who, what, tell, show
 who..
 where...
(ql:quickload :trivia)


(defun process-query (query)
  (let ((ret '()))
    (let ((entities (entity-uris:
                     (print "test trivia matching")))))))

(trivia:match '(:a (3 4) 5)
  ((list :a (list _ c) _)
   c))

(setf json-as-list
  '((:HEAD (:VARS "s" "p" "o"))
    (:RESULTS
     (:BINDINGS
      ((:S (:TYPE . "uri") (:VALUE . "#Dump"))
       (:P (:TYPE . "uri") (:VALUE . "#license"))
       (:O
        (:TYPE . "uri")
        (:VALUE . "/")))
      ((:S (:TYPE . "uri") (:VALUE . "#Dump"))
       (:P (:TYPE . "uri") (:VALUE . ""))
       (:O (:TYPE . "literal") (:VALUE . "1.0.0")))))))

(trivia:match json-as-list
  ((list (list :HEAD (list* :VARS (list* v)))
         (list :RESULTS
               (list* :BINDINGS (list* bindings))))
   (list v bindings)))
