Skip to content

Commit

Permalink
Initial version by Anička Marešová
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-stopka committed Dec 20, 2020
0 parents commit 89505b2
Show file tree
Hide file tree
Showing 7 changed files with 203 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PROGRAM = obluda

all:
ghc -O -o $(PROGRAM) $(PROGRAM).hs

27 changes: 27 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
obluda - random name generator

This little utility serves as a name generator: when fed with statistical data
about some language it outputs list of random names looking like that language.

How to compile
As this is a Haskell program, you should have some working Haskell
implementation installed - preferably GHC, you can get it at
http://www.haskell.org/ghc

How to use
The generator can be fed either with a corpus file or with a dump
file. Corpus file should contain only words of given language
divided by spaces.

Usage: obluda -c corpus_file number_of_lines
-r dump_file number_of_lines
-d corpus_file

where "obluda -[rc] filename n" generates n names of output,
"obluda -d filename" outputs dump of corpus file to stdout.
Dumps of several languages come with the program for immediate testing.

How to distribute
Feel free to distribute this file in compliance with the GNU GPL version 2.

Enjoy.
1 change: 1 addition & 0 deletions dumps/english-dump

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dumps/finnish-dump
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[(" ",' ',2.3364485e-3),(" ",'a',5.6074765e-2),(" ",'d',5.8411215e-2),(" ",'e',9.5794395e-2),(" ",'g',0.10280374),(" ",'h',0.1448598),(" ",'i',0.1588785),(" ",'j',0.2406542),(" ",'k',0.3901869),(" ",'l',0.41588786),(" ",'m',0.51635516),(" ",'n',0.5630841),(" ",'o',0.635514),(" ",'p',0.71728975),(" ",'r',0.72897196),(" ",'s',0.8364486),(" ",'t',0.9275701),(" ",'u',0.93457943),(" ",'v',0.9929907),(" ",'y',1.0),(" a",'d',0.13043478),(" a",'h',0.17391305),(" a",'i',0.39130434),(" a",'j',0.47826087),(" a",'k',0.5217391),(" a",'l',0.65217394),(" a",'m',0.6956522),(" a",'n',0.73913044),(" a",'s',0.95652175),(" a",'u',1.0),(" d",'h',1.0),(" e",'i',0.375),(" e",'l',0.5),(" e",'n',0.75),(" e",'p',0.8125),(" e",'r',0.875),(" e",'t',1.0),(" g",'e',0.6666667),(" g",'n',1.0),(" h",'a',0.33333334),(" h",'e',0.44444445),(" h",'i',0.5555556),(" h",'o',0.6111111),(" h",'u',0.8333333),(" h",'y',1.0),(" i",'h',0.33333334),(" i",'l',0.5),(" i",'s',0.8333333),(" i",'t',1.0),(" j",'a',0.45714286),(" j",'o',0.94285715),(" j",'u',1.0),(" k",'a',0.375),(" k",'e',0.5),(" k",'i',0.578125),(" k",'o',0.609375),(" k",'u',0.984375),(" k",'y',1.0),(" l",'a',0.27272728),(" l",'e',0.45454547),(" l",'i',0.54545456),(" l",'o',0.8181818),(" l",'u',1.0),(" m",'a',0.1627907),(" m",'e',0.27906978),(" m",'i',0.7209302),(" m",'u',1.0),(" n",'a',0.4),(" n",'i',0.85),(" n",'o',0.9),(" n",'y',1.0),(" o",'l',0.4516129),(" o",'m',0.516129),(" o",'n',0.7741935),(" o",'o',0.83870965),(" o",'s',0.87096775),(" o",'t',0.9354839),(" o",'u',1.0),(" p",'a',0.42857143),(" p",'e',0.45714286),(" p",'i',0.6857143),(" p",'o',0.8),(" p",'u',0.94285715),(" p",'y',1.0),(" r",'a',0.6),(" r",'i',1.0),(" s",'a',0.13043478),(" s",'e',0.3478261),(" s",'i',0.7826087),(" s",'o',0.8043478),(" s",'u',0.9130435),(" s",'y',1.0),(" t",'a',0.35897437),(" t",'e',0.53846157),(" t",'i',0.5897436),(" t",'o',0.71794873),(" t",'r',0.82051283),(" t",'u',1.0),(" u",'k',1.0),(" v",'a',0.32),(" v",'e',0.52),(" v",'i',0.64),(" v",'o',0.84),(" v",'u',1.0),(" y",'k',0.33333334),(" y",'l',0.6666667),(" y",'m',1.0),("a\n",' ',1.0),("aa",' ',0.1923077),("aa",'i',0.23076923),("aa",'l',0.26923078),("aa",'m',0.3653846),("aa",'n',0.84615386),("aa",'s',0.9230769),("aa",'t',1.0),("ad",'a',0.75),("ad",'u',1.0),("ah",' ',9.090909e-2),("ah",'a',0.27272728),("ah",'d',0.6363636),("ah",'t',0.90909094),("ah",'y',1.0),("ai",' ',6.451613e-2),("ai",'h',9.677419e-2),("ai",'k',0.29032257),("ai",'l',0.3548387),("ai",'n',0.67741936),("ai",'s',0.87096775),("ai",'t',0.9354839),("ai",'v',1.0),("aj",'a',1.0),("ak",'a',0.23076923),("ak",'b',0.30769232),("ak",'e',0.3846154),("ak",'i',0.46153846),("ak",'k',0.53846157),("ak",'o',0.61538464),("ak",'s',1.0),("al",'a',5.5555556e-2),("al",'i',0.16666667),("al",'j',0.22222222),("al",'k',0.2777778),("al",'l',0.7777778),("al",'o',0.8333333),("al",'t',0.9444444),("al",'u',1.0),("am",' ',7.692308e-2),("am",'a',1.0),("an",' ',0.64179105),("an",'a',0.7164179),("an",'e',0.74626863),("an",'h',0.76119405),("an",'i',0.8358209),("an",'k',0.8507463),("an",'n',0.8955224),("an",'o',0.9104478),("an",'s',0.9701493),("an",'t',0.98507464),("an",'u',1.0),("ap",'s',1.0),("ar",' ',7.1428575e-2),("ar",'a',0.2857143),("ar",'h',0.42857143),("ar",'j',0.5),("ar",'m',0.5714286),("ar",'s',0.71428573),("ar",'u',0.78571427),("ar",'v',1.0),("as",' ',0.1),("as",'k',0.2),("as",'s',0.4),("as",'t',0.85),("as",'u',0.95),("as",'v',1.0),("at",' ',0.3529412),("at",'a',0.47058824),("at",'i',0.5294118),("at",'k',0.64705884),("at",'o',0.7058824),("at",'t',0.88235295),("at",'u',1.0),("au",'k',0.375),("au",'l',0.4375),("au",'n',0.75),("au",'o',0.8125),("au",'t',1.0),("av",'a',0.875),("av",'l',1.0),("ay",'n',1.0),("ba",'r',1.0),("da",'n',0.25),("da",'r',1.0),("de",'l',0.33333334),("de",'s',1.0),("dh",'e',1.0),("di",'h',0.4),("di",'m',0.8),("di",'s',1.0),("do",'n',1.0),("du",' ',0.25),("du",'i',0.5),("du",'l',0.75),("du",'t',1.0),("ed",'o',1.0),("ee",' ',0.27272728),("ee",'l',0.45454547),("ee",'n',0.8181818),("ee",'s',1.0),("eh",'m',1.0),("ei",' ',0.3125),("ei",'k',0.4375),("ei",'l',0.75),("ei",'n',0.875),("ei",'s',1.0),("ek",'o',1.0),("el",'a',6.666667e-2),("el",'e',0.2),("el",'i',0.4),("el",'l',0.46666667),("el",'o',0.6),("el",'s',0.73333335),("el",'t',0.8666667),("el",'v',1.0),("em",'e',0.33333334),("em",'p',1.0),("en",' ',0.55737704),("en",'a',0.6229508),("en",'d',0.6885246),("en",'e',0.72131145),("en",'i',0.78688526),("en",'k',0.86885244),("en",'n',0.91803277),("en",'s',0.9836066),("en",'t',1.0),("ep",'a',1.0),("er",'e',0.22222222),("er",'i',0.44444445),("er",'o',0.5555556),("er",'r',0.8888889),("er",'t',1.0),("es",' ',0.11111111),("es",'i',0.22222222),("es",'s',0.7777778),("es",'t',0.8888889),("es",'u',1.0),("et",' ',0.29411766),("et",'a',0.3529412),("et",'i',0.5294118),("et",'k',0.5882353),("et",'t',0.9411765),("et",'u',1.0),("eu",'r',1.0),("ge",'e',1.0),("gn",'t',1.0),("ha",' ',7.1428575e-2),("ha",'l',0.14285715),("ha",'n',0.35714287),("ha",'p',0.42857143),("ha",'r',0.5714286),("ha",'t',0.64285713),("ha",'u',1.0),("hd",'a',0.16666667),("hd",'e',0.5),("hd",'i',0.6666667),("hd",'u',1.0),("he",'n',0.33333334),("he",'s',0.6666667),("he",'t',1.0),("hi",'k',0.2),("hi",'r',0.4),("hi",'t',0.6),("hi",'u',1.0),("hm",'a',0.5),("hm",'i',1.0),("ho",'u',1.0),("ht",'i',0.33333334),("ht",'o',1.0),("hu",'k',0.16666667),("hu",'m',0.33333334),("hu",'o',0.8333333),("hu",'u',1.0),("hy",'m',0.25),("hy",'v',1.0),("ia",' ',0.5),("ia",'n',1.0),("id",'e',1.0),("ie",'l',9.090909e-2),("ie",'m',0.18181819),("ie",'n',0.54545456),("ie",'s',0.6363636),("ie",'t',1.0),("ih",'a',0.2),("ih",'d',0.4),("ih",'i',0.8),("ih",'m',1.0),("ii",' ',9.677419e-2),("ii",'d',0.12903225),("ii",'k',0.16129032),("ii",'l',0.2580645),("ii",'m',0.29032257),("ii",'n',0.87096775),("ii",'t',1.0),("ij",'a',1.0),("ik",'a',0.33333334),("ik",'e',0.6),("ik",'i',0.73333335),("ik",'k',0.93333334),("ik",'s',1.0),("il",'a',5.0e-2),("il",'e',0.1),("il",'l',0.5),("il",'m',0.65),("il",'o',0.7),("il",'t',1.0),("im",'a',0.2857143),("im",'e',0.42857143),("im",'p',0.71428573),("im",'u',1.0),("in",' ',0.4827586),("in",'a',0.6896552),("in",'e',0.79310346),("in",'h',0.81609195),("in",'i',0.82758623),("in",'k',0.85057473),("in",'n',0.86206895),("in",'o',0.87356323),("in",'t',0.88505745),("in",'u',1.0),("io",'s',1.0),("ir",'a',0.5),("ir",'v',1.0),("is",' ',5.5555556e-2),("is",'a',0.1388889),("is",'e',0.44444445),("is",'i',0.6111111),("is",'o',0.6388889),("is",'s',0.7777778),("is",'t',1.0),("it",' ',0.22727273),("it",'a',0.45454547),("it",'e',0.5),("it",'k',0.54545456),("it",'s',0.6818182),("it",'t',0.95454544),("it",'u',1.0),("iu",'k',1.0),("iv",'a',0.75),("iv",'i',0.875),("iv",'o',1.0),("ja",' ',0.5416667),("ja",'a',0.625),("ja",'i',0.6666667),("ja",'l',0.7916667),("ja",'t',1.0),("jo",'k',0.3888889),("jo",'l',0.44444445),("jo",'n',0.6111111),("jo",'s',0.8888889),("jo",'u',1.0),("ju",'u',1.0),("ka",' ',0.2),("ka",'a',0.38181818),("ka",'d',0.4),("ka",'i',0.56363636),("ka",'k',0.6),("ka",'n',0.74545455),("ka",'r',0.7818182),("ka",'s',0.8545455),("ka",'u',0.9818182),("ka",'y',1.0),("kb",'a',1.0),("ke",'d',7.1428575e-2),("ke",'e',0.14285715),("ke",'i',0.21428572),("ke",'l',0.2857143),("ke",'m',0.42857143),("ke",'n',0.64285713),("ke",'r',0.9285714),("ke",'s',1.0),("ki",' ',4.761905e-2),("ki",'a',0.14285715),("ki",'i',0.33333334),("ki",'k',0.3809524),("ki",'m',0.42857143),("ki",'n',0.9047619),("ki",'o',0.95238096),("ki",'v',1.0),("kk",'a',0.16666667),("kk",'i',0.5833333),("kk",'o',0.75),("kk",'u',1.0),("ko",' ',0.14285715),("ko",'i',0.2857143),("ko",'l',0.42857143),("ko",'n',0.5714286),("ko",'s',0.85714287),("ko",'t',1.0),("ks",'e',0.23076923),("ks",'i',1.0),("ku",'a',0.11111111),("ku",'i',0.25),("ku",'k',0.30555555),("ku",'l',0.33333334),("ku",'n',0.7222222),("ku",'p',0.75),("ku",'s',0.8055556),("ku",'t',0.8611111),("ku",'u',0.9444444),("ku",'v',1.0),("ky",'l',0.33333334),("ky",'n',1.0),("la",' ',0.68421054),("la",'h',0.7894737),("la",'p',0.84210527),("la",'r',0.8947368),("la",'u',0.94736844),("la",'v',1.0),("le",' ',0.5769231),("le",'e',0.6923077),("le",'h',0.7307692),("le",'n',0.9230769),("le",'r',0.96153843),("le",'s',1.0),("li",' ',7.1428575e-2),("li",'i',0.14285715),("li",'j',0.21428572),("li",'m',0.35714287),("li",'n',0.5714286),("li",'s',0.78571427),("li",'t',1.0),("lj",'o',1.0),("lk",'e',0.33333334),("lk",'u',1.0),("ll",'a',0.44827586),("ll",'e',0.8965517),("ll",'o',1.0),("lm",'a',0.8),("lm",'e',1.0),("lo",' ',8.3333336e-2),("lo",'a',0.16666667),("lo",'h',0.25),("lo",'i',0.5),("lo",'o',0.5833333),("lo",'p',0.75),("lo",'s',0.9166667),("lo",'v',1.0),("ls",'k',1.0),("lt",'a',0.5833333),("lt",'i',1.0),("lu",' ',0.25),("lu",'a',0.5),("lu",'o',0.75),("lu",'p',1.0),("lv",'a',1.0),("ma",' ',0.41935483),("ma",'a',0.7419355),("ma",'h',0.8064516),("ma",'i',0.83870965),("ma",'n',0.9032258),("ma",'r',0.9354839),("ma",'t',1.0),("me",' ',0.25),("me",'i',0.625),("me",'l',0.875),("me",'n',1.0),("mi",'e',0.2),("mi",'k',0.25),("mi",'l',0.3),("mi",'n',0.95),("mi",'s',1.0),("mm",'a',1.0),("mp",'a',0.25),("mp",'i',0.5),("mp",'p',1.0),("mu",'a',7.1428575e-2),("mu",'i',0.21428572),("mu",'l',0.5),("mu",'n',0.64285713),("mu",'o',0.71428573),("mu",'t',1.0),("my",'i',1.0),("na",'\n',2.7777778e-2),("na",' ',0.6388889),("na",'a',0.7222222),("na",'h',0.7777778),("na",'i',0.8888889),("na",'j',0.9444444),("na",'k',1.0),("nd",'i',1.0),("ne",' ',0.15789473),("ne",'e',0.21052632),("ne",'n',1.0),("nh",'a',1.0),("ni",' ',0.41379312),("ni",'i',0.86206895),("ni",'n',0.8965517),("ni",'s',1.0),("nk",'a',0.3),("nk",'i',0.8),("nk",'u',0.9),("nk",'y',1.0),("nn",'a',9.090909e-2),("nn",'e',0.45454547),("nn",'i',0.72727275),("nn",'o',0.90909094),("nn",'y',1.0),("no",'a',0.16666667),("no",'i',0.5),("no",'s',0.8333333),("no",'u',1.0),("ns",'a',0.44444445),("ns",'i',0.8888889),("ns",'s',1.0),("nt",'a',0.16666667),("nt",'e',0.33333334),("nt",'o',0.6666667),("nt",'u',0.8333333),("nt",'y',1.0),("nu",'a',0.16666667),("nu",'k',0.33333334),("nu",'n',0.41666666),("nu",'t',1.0),("ny",' ',0.33333334),("ny",'t',1.0),("oa",' ',1.0),("oh",'d',1.0),("oi",' ',3.5714287e-2),("oi",'k',0.10714286),("oi",'l',0.14285715),("oi",'n',0.42857143),("oi",'r',0.4642857),("oi",'s',0.89285713),("oi",'t',0.96428573),("oi",'v',1.0),("oj",'a',1.0),("ok",'a',0.875),("ok",'s',1.0),("ol",'e',0.2631579),("ol",'i',0.6315789),("ol",'l',0.84210527),("ol",'m',0.8947368),("ol",'o',0.94736844),("ol",'t',1.0),("om",'a',1.0),("on",' ',0.6666667),("on",'e',0.7222222),("on",'k',0.7777778),("on",'n',0.9444444),("on",'o',1.0),("oo",'n',0.33333334),("oo",'t',1.0),("op",'u',1.0),("os",' ',0.30769232),("os",'a',0.3846154),("os",'i',0.46153846),("os",'k',0.61538464),("os",'s',0.6923077),("os",'t',1.0),("ot",'e',0.1),("ot",'i',0.2),("ot",'k',0.3),("ot",'s',0.5),("ot",'t',1.0),("ou",'d',0.16666667),("ou",'s',0.5),("ou",'t',1.0),("ov",' ',0.5),("ov",'a',1.0),("pa",'a',0.31578946),("pa",'h',0.36842105),("pa",'i',0.47368422),("pa",'k',0.57894737),("pa",'l',0.7368421),("pa",'s',0.7894737),("pa",'t',0.84210527),("pa",'u',0.94736844),("pa",'v',1.0),("pe",'t',1.0),("pi",' ',0.18181819),("pi",'a',0.45454547),("pi",'e',0.8181818),("pi",'i',0.90909094),("pi",'n',1.0),("po",'i',0.75),("po",'t',1.0),("pp",'i',1.0),("ps",'i',1.0),("pu",' ',0.11111111),("pu",'h',0.33333334),("pu",'k',0.44444445),("pu",'n',0.5555556),("pu",'o',0.6666667),("pu",'p',0.7777778),("pu",'t',1.0),("py",'r',0.5),("py",'y',1.0),("ra",'k',0.3),("ra",'l',0.4),("ra",'n',1.0),("re",'n',1.0),("rh",'a',1.0),("ri",' ',0.5),("ri",'i',0.6666667),("ri",'m',0.8333333),("ri",'n',1.0),("rj",'a',1.0),("rk",'i',1.0),("rm",'a',1.0),("ro",' ',1.0),("rp",'a',1.0),("rr",'a',1.0),("rs",'i',1.0),("rt",'a',1.0),("ru",'k',0.5),("ru",'s',1.0),("rv",'a',0.25),("rv",'e',0.75),("rv",'i',1.0),("sa",' ',0.46875),("sa",'a',0.6875),("sa",'i',0.71875),("sa",'l',0.78125),("sa",'n',0.9375),("sa",'s',1.0),("se",' ',0.22222222),("se",'l',0.2962963),("se",'n',0.7037037),("se",'s',0.7407407),("se",'t',0.962963),("se",'u',1.0),("si",' ',0.25531915),("si",'a',0.31914893),("si",'e',0.34042552),("si",'i',0.44680852),("si",'k',0.4680851),("si",'l',0.5531915),("si",'n',0.78723407),("si",'s',0.85106385),("si",'t',0.9787234),("si",'v',1.0),("sk",'a',0.5),("sk",'i',0.6666667),("sk",'u',0.8333333),("sk",'y',1.0),("so",'i',1.0),("ss",'a',1.0),("st",'a',0.65217394),("st",'e',0.7826087),("st",'i',0.95652175),("st",'u',1.0),("su",'a',0.2),("su",'k',0.3),("su",'l',0.4),("su",'n',0.5),("su",'s',0.6),("su",'t',0.8),("su",'u',1.0),("sv",'o',1.0),("sy",'n',0.5),("sy",'v',1.0),("ta",' ',0.4375),("ta",'a',0.578125),("ta",'h',0.625),("ta",'i',0.671875),("ta",'m',0.765625),("ta",'n',0.875),("ta",'r',0.90625),("ta",'v',1.0),("te",' ',8.695652e-2),("te",'e',0.2173913),("te",'i',0.47826087),("te",'k',0.5217391),("te",'l',0.6956522),("te",'n',0.9130435),("te",'r',0.95652175),("te",'t',1.0),("ti",' ',0.42105263),("ti",'e',0.47368422),("ti",'i',0.7368421),("ti",'l',0.7894737),("ti",'n',0.8947368),("ti",'v',1.0),("tk",'a',0.42857143),("tk",'i',0.5714286),("tk",'o',0.71428573),("tk",'u',1.0),("to",'i',0.75),("to",'j',0.9166667),("to",'v',1.0),("tr",'e',1.0),("ts",'a',0.4),("ts",'e',1.0),("tt",'a',0.53571427),("tt",'e',0.85714287),("tt",'i',0.9285714),("tt",'u',0.96428573),("tt",'y',1.0),("tu",' ',7.1428575e-2),("tu",'i',0.14285715),("tu",'k',0.2857143),("tu",'l',0.5),("tu",'n',0.71428573),("tu",'o',0.85714287),("tu",'r',0.9285714),("tu",'s',1.0),("ty",' ',0.5),("ty",'i',1.0),("ua",' ',0.7),("ua",'a',0.9),("ua",'m',1.0),("ud",'u',1.0),("uh",'u',1.0),("ui",'n',0.5555556),("ui",'s',0.8888889),("ui",'v',1.0),("uk",'a',0.23809524),("uk",'k',0.61904764),("uk",'s',0.85714287),("uk",'u',1.0),("ul",'e',0.21428572),("ul",'k',0.35714287),("ul",'l',0.85714287),("ul",'t',0.9285714),("ul",'u',1.0),("um",'a',1.0),("un",' ',0.64285713),("un",'i',0.85714287),("un",'n',0.89285713),("un",'s',0.9285714),("un",'t',0.96428573),("un",'u',1.0),("uo",'i',7.692308e-2),("uo",'k',0.15384616),("uo",'l',0.3846154),("uo",'n',0.6923077),("uo",'t',1.0),("up",'a',0.33333334),("up",'u',1.0),("ur",'i',0.5),("ur",'p',0.75),("ur",'u',1.0),("us",' ',0.42857143),("us",'i',0.5714286),("us",'t',0.71428573),("us",'u',1.0),("ut",' ',0.33333334),("ut",'a',0.45833334),("ut",'e',0.5),("ut",'k',0.5833333),("ut",'o',0.6666667),("ut",'t',1.0),("uu",' ',0.25),("uu",'l',0.625),("uu",'n',0.75),("uu",'r',1.0),("uv",'a',0.5),("uv",'i',1.0),("va",' ',6.896552e-2),("va",'a',0.1724138),("va",'i',0.27586207),("va",'k',0.37931034),("va",'l',0.4827586),("va",'n',0.6551724),("va",'r',0.7241379),("va",'s',0.86206895),("va",'t',1.0),("ve",'e',0.14285715),("ve",'n',0.42857143),("ve",'r',0.71428573),("ve",'t',1.0),("vi",'e',0.125),("vi",'i',0.25),("vi",'l',0.375),("vi",'n',0.625),("vi",'t',1.0),("vl",'o',1.0),("vo",'i',1.0),("vu",'o',1.0),("yh",'i',1.0),("yi",' ',0.5),("yi",'l',1.0),("yk",'s',1.0),("yl",'i',0.5),("yl",'m',1.0),("ym",'m',0.5),("ym",'y',1.0),("yn",' ',0.2),("yn",'e',0.4),("yn",'i',0.6),("yn",'k',0.8),("yn",'t',1.0),("yr",'k',1.0),("yt",' ',1.0),("yv",'a',0.6),("yv",'i',1.0),("yy",'h',1.0)]
Loading

0 comments on commit 89505b2

Please sign in to comment.