Index: cclg.ml ================================================================== --- cclg.ml +++ cclg.ml @@ -1,9 +1,9 @@ type word = A of string | An of string type root = Edy of word | Xy of word | Ation of word | Le of word | A of word | Cy of word | Rous of word | Ics of word | Ics2 of word | Sis of word | X of word | Ality of word | Ty of word - | Ication of word | Tion of word | Arity of word | Sm of word + | Ication of word | Tion of word | Arity of word | Sm of word | Ine of word type prefix = Inv of word | Vf of word * string let prefixes = [| Vf(A "mult","i"); Inv (A "pre"); Vf(An "ex","o"); Vf(A "retr","o"); Inv (A "hyper"); Vf(A "hem","i"); Inv (A "eu"); Vf(A "par","a"); Vf(A "gastr","o"); Vf(A "bell","i"); Inv (An "an"); Vf(A "mes","o"); @@ -29,11 +29,11 @@ Vf(A "dendr","o"); Vf(A "matr","i"); Vf(A "patr","i"); Vf(A "lesb","o"); Vf(A "hom","o"); Vf(A "heter","o"); Vf(A "prot","o"); Vf(An "ect","o"); Vf(A "weeb","o"); Vf(A "fung","i"); Vf(A "per","i"); Vf(A "petr","i"); Vf(A "sad","o"); Vf(A "femin","i"); Vf(A "mascul","o"); Vf(A "claustr","o"); Vf(A "neur","o"); Vf(A "norm","o"); Inv (A "eu"); Vf(A "sten","o"); - Vf(A "stegan","o"); + Vf(A "stegan","o"); Vf(A "rhod", "o"); Vf(An "agor","a"); Vf(A "thanat","o"); Vf(A "vagin","o"); Vf(A "bi","o"); Vf(A "blog","o"); Vf(A "prometh","eo"); Vf(An "anesthes", "io"); Vf(A "din","o"); Vf(A "medic","o"); |] @@ -109,10 +109,11 @@ Ality (A "leg"); Sm (A "legali"); Ation (A "leg"); A (A "pragmat"); A (A "stigmat"); + Ine (A "rhadamanth"); |] let nsuffixes = [| An "ite"; An "ate"; @@ -225,38 +226,39 @@ let chance i = (Random.int i) = 0 let cform root = match root with | Edy x -> x^^"edo" | Xy x -> x^^"cto" | Ation x -> x^^"o" | Rous x -> x^^"ro" | Le x -> x^^"ulo" | A x -> x^^"o" | Cy x -> x^^"tico" | Ics x | Ics2 x -> x^^(if chance 2 then "i" else "o") - | Sis x -> x^^"to" + | Sis x -> x^^"to" | Ine x -> x^^"o" | X x -> x^^"co" | Ality x -> x^^"o" | Ty x -> x^^"to" | Ication x -> x^^"o" | Tion x -> x^^"to" | Arity x -> x^^"a" | Sm x -> x^^(if chance 2 then "smo" else "sto") let bareform root = match root with | Edy x -> (if chance 2 then x else x^^"ed") | Xy x -> x^^"ct" | Ation x -> x | Rous x -> x^^"r" | Le x -> x^^"ul" | A x -> x | Cy x -> x^^"tic" | Ics x -> x^^"ic" | Ics2 x -> x | Sis x -> x^^"t" | X x -> x^^"c" | Ality x -> x | Ty x -> x^^"t" | Ication x -> x | Tion x -> x^^"t" | Arity x -> x - | Sm x -> x^^"st" + | Sm x -> x^^"st" | Ine x -> x let adjform root = match root with | Edy x -> x^^"ic" | Xy x -> x^^"ctic" | Ation x -> x^^"ic" | Rous x -> x^^"rous" | Le x -> x^^"ulous" | A x -> x^^"e" | Cy x -> x^^"tical" | Ics x -> x^^"ical" | Ics2 x -> x^^"ic" | Sis x -> x^^"tic" | X x -> x^^"cal" | Ality x -> x^^"al" | Ty x -> x^^"tical" | Ication x -> x^^(if chance 3 then "itious" else "icate") | Tion x -> x^^(match Random.int 4 with | 0 -> "tive" | 1 -> "ted" | 2 -> "cious" | 3 -> "tory" | _ -> assert false) | Arity x -> x^^"ary" | Sm x -> x^^(if chance 2 then "stic" else "smic") + | Ine x -> x^^"ine" let nform root = if chance 7 then (adjform root) ^^ "ness" else match root with | Edy x -> x^^"edy" | Xy x -> x^^"xy" | Ation x -> x^^(if chance 3 then "itor" else "ation") | Rous x -> x^^"er" | Le x -> x^^"le" | A x -> x^^"a" | Cy x -> x^^"cy" | Ics x -> x^^(if chance 3 then "ician" else "ics") | Sis x -> x^^"sis" | Ics2 x -> x^^(if chance 3 then "ician" else "ics") | X x -> x^^"x" | Ality x -> x^^"ality" | Ty x -> x^^"ty" | Ication x -> x^^"ication" | Tion x -> x^^"tion" | Arity x -> x^^"arity" - | Sm x -> x^^(if chance 2 then "st" else "sm") + | Sm x -> x^^(if chance 2 then "st" else "sm") | Ine x -> x let abs (w:word) = match w with A x | An x -> x let append pref w = match pref with | Inv x -> x ^^ (abs w) | Vf(body,v) -> match w with | An x -> body^^x Index: drug.scm ================================================================== --- drug.scm +++ drug.scm @@ -136,11 +136,11 @@ ; ('stat 'inch), and returns a string of text describing ; the person in that state ; e.g. (outta-mind '3sg.f 'prs 'stat) → "is outta her mind" ; (suicidal '3sg.m 'fut 'stat) → "is gonna want to die" -(define (adjective pers tense aspect) +; (define (adjective pers tense aspect)) (define (pick-rec top-list) ; note: do not expose to (let ([e (pick top-list)]) ; empty vectors (if (vector? e) (pick-rec e) e)))