Index: drug.scm ================================================================== --- drug.scm +++ drug.scm @@ -1,10 +1,10 @@ (include "lib/lisp-macro.scm") (include "lib/fail.scm") (include "lib/interlace.scm") (include "lib/bot.scm") -(include "lib/struct.scm") +(include "lib/fn-struct.scm") (include "lib/verb.scm") (define (forms fn vb . args) (list->vector (map (lambda (a) (fn vb a)) args))) @@ -11,14 +11,52 @@ (define (flexprep vb . args) (list->vector (append (map (lambda (x) postpositive vb x) args) (map (lambda (x) phrase vb x) args)))) + +(define transitive-verbs (interlace vector + (verb:weak "whack") + (verb:weak "bludgeon") + (verb:weak "brain") + (verb:weak "debunk") + (verb:weak "disembunk") + (verb:strong "disprove" "disproved" "disproven") + (verb:weak "disbar") + (verb:weak "demolish") + (verb:weak "defend") + (verb:weak "defund") + (verb:strong! "shoot" "shot") + (verb:heavy "zap" "p") + (verb:weak "spank") + (verb:es "ravish") + (forms postpositive + (verb:es "piss") "on" "at" "upon" "away") + (verb:e "disembon") + (verb:e "debat") + (verb:e "demot") + (verb:e "puzzl") + (verb:e "scrobbl") + (verb:e "chok") + (verb:e "defil") + (verb:e "freebas") + (verb:e "us") + (verb:e "vap") + (verb:e "smok") + (verb:e "gargl") + (verb:e "guzzl") + (verb:e "admir") + (forms postpositive + (verb:weak "shout") "at" "up" "away") + throw. (verb:strong "throw" "threw" "thrown") + (forms postpositive + throw "up" "away") +)) (define intransitive-verbs (interlace vector (forms phrase - (verb:strong "get" "got" "gotten") "up" "off" "out") + (verb:strong-heavy "get" "t" "got" "gotten") "up" "off" "out") (verb:weak "leak") (verb:weak "scream") (verb:weak "fear") hurt. (verb:strong! "hurt" "hurt") (forms postpositive @@ -93,13 +131,13 @@ (verb:e "chok") (verb:e "blaz") (verb:e "freebas") (verb:e "us") (verb:e "vap") - (verb:e "smoke") - (verb:e "gargle") - (verb:e "guzzle") + (verb:e "smok") + (verb:e "gargl") + (verb:e "guzzl") (verb:e "mainlin") (verb:y "tr") (verb:heavy "stab" "b") (verb:heavy "pop" "p") (verb:heavy "zap" "p") @@ -197,11 +235,10 @@ (~ "asshole" [@ sg pl]) (~ "clown" [@ sg pl]) (~ "fear" [@ mass]) (~ "person" [@ sg (pl/i "people")])))) ; TODO: second-order verbs -#| (define (verb-phrase tense noun) (let* ([verb (pick-rec transitive-verbs)] [noun-form (pick noun)] [det (pick (cdr noun-form))] [bare-noun (car noun-form)]) @@ -216,6 +253,7 @@ [vbd-noun ((verb (cdr mode)) bare-noun)]) (vector (cons vbd-noun (cdr noun-form))))) (print "in this house, we " (verb-phrase 'inf (mod-noun (pick nouns)))) (exit 0) +#| |# Index: lib/struct.scm ================================================================== --- lib/struct.scm +++ lib/struct.scm @@ -15,11 +15,11 @@ ; (if (user? stacy) (user.name stacy)) ; (define oldstacy (user stacy age: 69)) ; (user.name oldstacy) ; (user.age oldstacy) -(include "lisp-macro.scm") +;(include "lisp-macro.scm") (import (chicken pretty-print) (chicken keyword)) (begin-for-syntax (import (chicken keyword))) Index: lib/verb.scm ================================================================== --- lib/verb.scm +++ lib/verb.scm @@ -1,10 +1,10 @@ ; [ʞ] verb.scm ; ~ lexi hale ; © affero general public license ; > (load "lib/lisp-macro.scm") -; (load "lib/struct.scm") +; (load "lib/fn-struct.scm") ; (load "lib/verb.scm") ; macros, functions, and rules for conjugating verbs and ; generating verb phrases. this library rules was written ; specifically for english verbs and cannot be used as a @@ -159,10 +159,19 @@ (prs [stem "s"] *o*) (ger [stem "ing"] *o*) (adj [stem "ing"] *o*) (pst [ipst] *o*) (ppl [ippl] *o*)) + +(verb-form (strong-heavy stem final ipst ippl) + ; e.g. drink → drank + (inf [stem] *o*) + (prs [stem "s"] *o*) + (ger [stem final "ing"] *o*) + (adj [stem final "ing"] *o*) + (pst [ipst] *o*) + (ppl [ippl] *o*)) (verb-form (irregular iinf iprs iger ipst ippl) ; e.g. have → has → had (inf [iinf] *o*) (prs [iprs] *o*)