@@ -1,14 +1,17 @@ -; ʞ / verb.scm -; (depends lisp-macro.scm struct.scm) -; a library by lexi hale -; -; 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 -; "drop-in" library for other languages; however, the -; structured and functions used are sufficiently generic -; that it should be portable to other languages with +; [ʞ] verb.scm +; ~ lexi hale +; © affero general public license +; > (load "lib/lisp-macro.scm") +; (load "lib/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 +; "drop-in" library for other languages; however, the +; structured and functions used are sufficiently generic +; that it should be portable to other languages with ; minimal effort. ;;;; section i. generic functions & structures @@ -24,12 +27,12 @@ ; * l10n note: the fields mentioned in the last line of the ; (verb-form) macro must always match the fields listed in (define verb (struct 'inf 'prs 'ger 'adj 'pst 'ppl)) -; takes a list of individual strings and joins them with +; takes a list of individual strings and joins them with ; spaces. occurrences of "a" are automatically replace by ; "an" if the word following them appears to start with a -; vowel. this can be forcibly induced by preceeding that +; vowel. this can be forcibly induced by preceeding that ; word with the symbol 'vowel in the list ; TODO: make it handle initialisms. yes, everything about ; this is horrible. yes, this *is* the wrong way to do it. ; yes, i *am* ashamed. why do you ask @@ -86,16 +89,16 @@ ; - vb: final, "stem" verb (define (compound prefix vb) (lambda (form) (lambda (*o*) (word-append (string-append prefix ((vb form) *o*)))))) -; create a verb where another string interposes between the -; root verb and the object. this can be used to implement -; object incorporation or prepositional verbs such as "get -; off on" (not to be confused with phrasal verbs) -; a phrasal verb. +; create a verb where another string interposes between +; the root verb and the object. this can be used to +; implement object incorporation or prepositional verbs +; such as "get off on" (not to be confused with phrasal +; verbs) a phrasal verb. ; - vb: the root (leftmost) verb -; - pps: the preposition complex immediately following the -; verb. +; - pps: the preposition complex immediately following +; the verb. (define (postpositive vb post) (lambda (form) (lambda (*o*) (if (or (equal? form 'ppl) (equal? form 'adj)) (word-append (string-append ((vb form) '()) "-" post)