procgen  Artifact [c3beb2da63]

Artifact c3beb2da6339fb6870420dbc59b43a7754d1fba75ade8422252e09490b8a8efd:


(include "bot.scm")

(define actors
  '#(me you thou they him her myself "your mother" "your mom" "your father"
	"your dad" "your aunt" "your uncle" "your dog"))

(define pronouns '(
  (you    (nom . "you")  (acc . "you")  (gen . "your")  (poss . "yours")  )
  (thou   (nom . "thou") (acc . "thee") (gen . "thy")   (poss . "thine")  )
  (they   (nom . "they") (acc . "them") (gen . "their") (poss . "theirs") )
  (him    (nom . "he")   (acc . "him")  (gen . "his")   (poss . "his")    )
  (her    (nom . "her")  (acc . "her")  (gen . "hers")  (poss . "hers")   )
  (me	  (nom . "I")    (acc . "me")   (gen . "my")    (poss . "mine")   )
  (myself (nom . "I") 	 (acc . "myself") (gen . "my own") (poss . "my own"))))

(define (conjugate v t n)
  (if (eq? v 'cop)
	(case (cons t n)
	

(define (inflect c n)
  (if (string? n)
	(case c
	  ((nom acc)  n)
	  ((gen poss cop) (string-append n "'s")))
	; else
	(cdr (assq c (cdr (assq n pronouns))))))

(rule (action victim)
  ("port " victim " to lisp")
  ("rain on " victim "'s parade"))

(rule (subject actor)
  ((inflect 'cop actor) " gonna")
  ((inflect 'nom actor) " swear"))
  
(print
  (inflect
	(pick '#(nom acc gen poss))
	(pick actors)))

;(print (action "you"))