Héllo,

I'm trying to build a Q/A system ontop of minikanren but I'm stuck.

I have procedures to parse sentences for instance the following:

(pk (parse-sentence '(the cat play the guitar)))

;;; ((S (NP (DETERMINER . the) NOUN . cat) (VERB . play) (NP (DETERMINER . 
the) NOUN . guitar)))

(pk (parse-sentence '(amz3 play the piano)))
;;; ((S (NP NAME . amz3) (VERB . play) (NP (DETERMINER . the) NOUN . 
piano)))

As input I have the previous sentences which are btw pared using minkanren.

Now I'd like that given a question like the following:

(pk (parse-sentence '(who play the guitar)))

;;; ((S (Q . who) (VERB . play) (NP (DETERMINER . the) NOUN . guitar)))

I want to answer that question programmatically, right now I don't how to 
do better than:

(let ((sentences '((the cat play the guitar) (amz3 play the piano))))
  (let ((sentences (map parse-sentence sentences)))
    (map (lambda (s)
           (map pk (reify* (out)
                           (== (list 'S out '(VERB . play) '(NP (DETERMINER 
. the) NOUN . guitar)) s))))
         sentences)))



-- 
You received this message because you are subscribed to the Google Groups 
"minikanren" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/minikanren.
For more options, visit https://groups.google.com/d/optout.

Reply via email to