fork download
  1. (require '[clojure.string :as st])
  2.  
  3. (defn nested-str [& coll] (apply str (flatten coll)))
  4. (defn rand-str [num-blanks pieces] (nested-str (rand-nth (concat
  5. (repeat num-blanks "")
  6. pieces))))
  7. (def boundaries ["!"".""..."])
  8. (def vowels ["a""i""o""e""u""a""i""o""e""u""ia""ai""ei"])
  9.  
  10. (defn vowel [] (rand-str 0 vowels))
  11. (defn boundary [] (rand-str 6 boundaries))
  12. (def possible-syllables [1 2 1 2 1 2 3])
  13. (def opening-consonants ["S""T""K""N""Y""P""K""L""G""Gl""Th""Sh""Ny""Ft""Hm""Zvr""Cth"])
  14. (def opening-vowels (for [v (map st/capitalize vowels) c (map st/lower-case opening-consonants)] (str v c)))
  15. (def closing-consonants ["l""p""s""t""n""k""g""x""rl""th""gg""gh""ts""lt""rk""kh""sh""ng""shk"])
  16. (def mid-consonants (concat closing-consonants ["h""gl""gr""nd""mr""vr""kr"]))
  17. (defn word []
  18. [(rand-str 0 (concat (apply concat (repeat (* 5/3 (count vowels)) opening-consonants)) opening-vowels))
  19. (repeatedly (dec (rand-nth possible-syllables))
  20. #(do[(vowel)
  21. (rand-str 12 [(str \' (vowel)) (str \- (vowel))])
  22. (rand-str 0 mid-consonants)]))
  23. [(vowel)
  24. (rand-str 9 [(str \' (vowel)) (str \- (vowel))])
  25. (rand-str 10 closing-consonants)]])
  26. (defn phrase [] (let [gap (boundary) w (word)] [gap
  27. (if (seq gap)
  28. [" " w]
  29. [(rand-str 4 ",")" "(st/lower-case (nested-str w))])]))
  30. (defn initial-capitalize [s] (apply str (st/upper-case (first s)) (rest s)))
  31. (println (initial-capitalize (re-find #"\p{L}.+"(nested-str[(repeatedly 500 phrase)"."]))))
  32.  
Success #stdin #stdout 2.43s 335040KB
stdin
Standard input is empty
stdout
Thagai-eigh keika. Thip. Ohmailt ogilt kalt zvre, ulalt, uki-a ineish. Thuka-elt otelt shi'ailt. Yorl. Shakoshkerk... Hmaigra iyaga izvria-ugh cthag aizvriarl kukru'ork. Gu. Gende... Yuno'irkai, ekugheirk ushaishk, gaseith eyia lone'eikh ftugrutsin zvri-iakhi-ik, thek to-anda! Iglana na'iangekhe pogin. Yaishkei-othiats kekhia'ung cthiagh! Suts kate agiamrighe. Ka. Ke-a gleghi-eil. Niagipep ogo-igrogga! Nu-eikrung hmu, thondi, kong... Ftepi-u, nexe pangegh, yindik gla-i... Zvrokraglil... Glondurk nyukrokh korkai-evrus. Oseng. Eneishiasheith ftia'i nes eglurk, aftapeigh iatuxo-iashai, pepi'airk nyando-ishk ehmeltikrein... Korkugge'es cthia shiashk uthet! Hmekandalt notherl. Giggun, nyel eyiggokragh cthi-a. Thuku, tharle'ig se-eis thuno cthia-eip zvrogga ahmiala isalti'iax... Uglu-ugre! Giaglurk eketherkai zvrega! Agaigegri'ul le, so! Iathorlia... Ke... Usheirlath ko'eikha la zvre hmaisei... Ihmatia thago, yohe, ga'us aglu'ats osaits ipatsi'aip ucthi. Gailtai-ai! Ftiashkeish pol yuggo'iagleth! Eyirlug... Ne! Fturk. Glialorlu ftokharke alasiap otiagg... Piakai-ais. Yia yai'ets uzvru. Piase, acthingimresh. Zvrokhukhek. Gish... Kavrikre! Kekh eku'aikeg... Luxing yorla isep kialax kashagg kak, theghia'ul! Kokrailirk ekoggagra-airk kult eipiathark... Eikaivrepo ethult uno. Iazvriathuts hmu'ultepep, ge! Uhme, nyihot, glushu'es. Zvrosholt iacthi'uthango kia laindai'al! Thik thigu'okh thi na-ilots... Ogek... Zvrisakregg! Azvro'ais... Nyirkeshkias aiftu-oshk sorlu nyi, ehmano'elax luggung... Anyo-ashesh! Kuthai! Zvreit. Hme-iang thia'e, ti aikan kande, toho'eth... Eiftoshk! Hmo-aggai sorl. Shokhai ashe... Analtei yeterl thi ftat theighuts ipeindukh gaindots! Tigg uleng yag... Lat kishurlialt... Nu hmanip. Cthigheghuk ulurkuhus hmaish hmitei-irl ufti'uxe iniag oftuhelt gap ikokhiax hmondungo'ais, kiteil. Eteikraixu'erl! Enosh keiggetso pap... Pu-al... Icthishult akei'al aigla'eig. Uzvretu'u ogeshkeshun, uftetalt asohol, unyos. Cthuseig tugrei glu'uhilt! Hmeig! Eftuthe epokhog nulia. Kamrul liku-a... Aipigeith... Olia-ohirk niku'ep! Aiftu'orligg... Go gu'u! Fto oga-o sia-ish iyerkia'ot uthoth. Ahmikh, glekho-e, use acthande'agg, oli, neha eftairla, thapet! Ehmo'ugg! Eshashkai'okh zvraingo'airl kia, eizvriashkiarl akes! Nyiapung. Ugiatekh. Uzvral zvreikrark ulashkok! Tiahip! Aseitung zvrugrait, pegeng ehmits! Inateirl okon athi! Shai'o! Anyogg. Nyiakregg. Zvro oshai-arkei... Hmai-il. Kin geimrei utethush... Ohma'o yi, eftiagrushian guth... Cthogaingi'ak! Aigia hmo hmeshka'ok liti'onuth iaftashun zvreshku'a inyagrag. Shi'ai. Ftundeil, akugg! Ugaixia... Enyi'ilt shetigh osu'urkit kia-ugg. Nyalteigh tendengirk uhmisha'e ineirl... Lotei-o saig. Akiath... Cthakirke asulti-iggugh temrung ialavrengei izvraiglo ekia. Shipiaglai itai-eshkeit olukra'inei'u kaikhogg pia'ukrag, opia. Otho'ex, toshk. Zvrai. Aihmeshk... Aipuxosh, izvrork. Eyu'e... Eglekh nyetsia. Iathukhukh... Uhmishkai la-agrorku-og, karken. Yi uyeshek... Nili'ushk. Cthei. Gli... Narla'igg nogra'a. Uftoxup! Afti. Yai'aigh ulingeng eiyuhe. Ania! Pe shashku alatorl! Eifte! Fto hmiggushk, octha'i. Aifta-og pihigg taipukhikh ekip gets tho'ikri-okh kogret lalt pi ushi to, izvre'ag gloshkarkex geltakhark. Sakrilt! Pe othenaindei'ip. Aputiats iftugg zvropa! Zvrorlo, kultosh lu'i ohmiathigg fti'ashk ko lork... Norleish! Aipirl eizvregre'ang, igloth, geth silop eyugg, icthia shimraina ecthe-urlerlerk! Afta sipa-aghat iyungaseik kairlai'ethei'ang... Nyekha'ai thi zvrongit. Nit. Zvreirlig, oshivrai upiageshoth, shalang, cthialeigg... Enaingu nengai... Anikheputh. Iakirk! Siashits nyoshox! Zvru uyi'ei acthirki nyei'eshkut ftots hmu. Iku-epigh ianikreth kiako, yuthork thax negria. Gia-iagh kiasande... Ku'athe iathish inyai. Anyuth... Onu ku-urkaig einyigrol ftiasheivreis! Turla-agegg uni-irkikh ohmap! Ashirk, aiglandiandorl... Glo'iag, glax... Ke'esh ti, aihmu-eike kekrei-as otu-o hmeis, lendash yiang! Ainyushi elakhul, shak ftogligria'ip... Lu'ethailto, zvra-ukri hmo'upapu-o, lei'iang eka, ehmiashi-irl hmo-ia. Kenge-ong, gith! Asa'egran nyolt! Anyo-ugokeikh gukh. Kushk yeis glolisa. Acthas... Unu'usurk zvronguth zvreishiaking... Asong. Thovro-i gitiatorl lia'ats... Iacthia... Eishagha, gotse, cthu... Zvrogoteig, surlo the'eishugh... Ifto... Ohmegling iasapu king. Upavrushk ftu-urk iazvri... Kag... Lemreigg, uso-aithaltei-ep kia-oshu-irl iayeshkuguk. Peivra'iamri... Shaigh... Kuliax ashe nyeighork kathongei, hmiaghogh oglogro-a nyatathi-aikh tu'ik, lia.