12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
...
135
136
137
138
139
140
141
142
143
144
145
146
147
148
...
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
...
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
...
290
291
292
293
294
295
296
297
298
299
300
301
302
303
...
314
315
316
317
318
319
320
321
322
323
324
325
326
327
...
373
374
375
376
377
378
379
380
381
382
383
384
385
386
...
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
...
544
545
546
547
548
549
550
551
552
553
554
555
556
557
...
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
...
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
|
let range min max = (Random.int (max-min)) + min
let chance n = range 0 n = 0
let pick (r: 'a array) : 'a = r.(range 0 (Array.length r));;
module CrimeDrug = struct
let frics = [| "f"; "sh"; "th"; |]
let vfrics = [| "z"; "v"; "zh"; |]
let stops = [| "t"; "p"; "k"; "c"; |]
let vstops = [| "d"; "b"; "g"; "gh"; |]
let withglide r f = Array.map (fun i -> i^f) r
let withonset r o = Array.map (fun i -> o^i) r
let consonants = Array.concat [
frics; vfrics; stops; vstops;
withonset stops "s";
[| "w"; "r"; "rh"; "s"; "l"; "ch"; "n"; "m"; |];
]
let initials = Array.concat [
consonants;
withglide frics "r"; withglide frics "l"; withglide frics "w";
withglide stops "r"; withglide vstops "r"; withglide vstops "w";
[| "qu"; "spr"; "spl"; "str"; "scr"; "scl"; "squ"; "bl"; "gl"; "sn"; "sm"; "j"; "h"; "sph"; "ph";|];
]
let nuclei = [| "e"; "ee"; "i"; "a"; "ou"; "u"; "oo"; "ea"; "oa"; "ai"; "oi"; "ie";|]
let finals = Array.concat [
vstops;
withonset stops "s"; withonset stops "r"; withonset stops "l";
withonset vstops "r"; withonset vstops "l";
[| "gh"; "ck"; "ce"; "ss"; "se"; "nd"; "mb"; "mph"; "nk"; "tch"; "ke"; "ght";
"ff"; "ll"; "zz"; "t"; "p"; "th"; "rth"; "lth"; "dge"; "nge"; "ng"; "ft"; "ckle"; "ngle"; "rkle";
"scht"; "ze"; "x"; "sh"; "rsh"; "lsh"; "ggle"; "ddle"; "bble"; "pple"; "rge"; "lge"; "ve"; "rve";
"lve"; "ffle"; "ttle"; "kle"; "sch"; "m"; "n"; "rm"; "lm"; "rn"; "ln";|]
]
let prefixes = [| A "crack"; A "crystal"; A "powdered"; A"raw"; A "pure"; A "liquid";
A"street"; A "super"; An "electric"; A "diced"; A "homemade"; A "traditional";
An "old-school"; A "purified"; A "high-caliber"; A "high-octane"; An "old-fashioned";
A "good old"; A "honest-to-god"; A "weapons-grade"; A "soviet"; An "american";
A "canadian"; A "british"; A "russian"; A "synthetic"; A "french"; A "cyber"; |]
let makeA i x = A(i ^ x)
let makeAn x = An x
let maybeConcat x y = match x with
| Some t -> wconcat t y
| None -> y
let gen () : word = maybeConcat (if chance 3 then Some (pick prefixes) else None)
((if chance 5 then makeAn else makeA (pick initials))
((pick nuclei) ^ (pick finals)))
end
let rec crime = R [|
Tv "arson";
T "murder";
T "jaywalking";
T "larceny";
................................................................................
T "war profiteering";
T "blackmail";
T "cybercrime";
T "espionage";
T "hijacking";
T "hooliganism";
T "perjury";
T "refusal to serve in a public office";
B [ T "failure to appear before"; Indef; profession ];
B [ T "refusal to serve as"; Indef; profession ];
B [ T "stalking"; O(T"of"); Indef; profession ];
B [ T "solicitation of"; Indef; profession ];
B [ T "bribery of"; Indef; profession; ];
B [ T "cruelty to"; Indef; profession; ];
................................................................................
B [ T "receiving stolen"; thingp ];
B [ T "deploying"; Indef; thing ];
T "being horny";
T "marketing";
T "advertising";
T "unlawful restraint";
T "trespassing";
|] and doing = R [|
Tv "entering";
T "decorating";
Tv "invoking";
Tv "evoking";
Tv "insulting";
Tv "advertising";
Tv "mentoring";
Tv "bantering";
Tv "yiffing";
Tv "posting";
Tv "tweeting";
Tv "blogging";
|] and practice = R [|
T "falconry";
T "dentistry";
T "philosophy";
T "linguistics";
T "conjuration";
T "illusion";
T "mathematics";
T "set theory";
T "math";
T "physics";
T "astrophysics";
T "natural philosophy";
T "chemistry";
T "engineering";
T "marketing";
T "advertising";
T "blogging";
T "tweeting";
................................................................................
|] and instrument = R [|
T "clarinet";
T "piano";
Tv "oboe";
T "flute";
T "violin";
|] and thing = R [|
T "clarinet";
T "piano";
T "deadly weapon";
T "firearm";
T "weapon";
T "sex doll";
T "rhinocerous";
T "farm animal";
T "landmine";
T "rocket launcher";
T "rocket-propelled grenade";
T "grenade";
T "ballistic missile";
T "ICBM";
T "rifle";
T "vibrator";
Tv "assault rifle";
Tv "assault weapon";
Tv "automatic weapon";
Tv "artifact";
Tv "orb";
T "cursed object";
Tv "infectious disease";
T "nuclear weapon";
T "bioweapon";
T "chemical weapon";
T "memetic hazard";
T "metaphor";
T "simile";
Tv "analogy";
T "turkey baster";
T "rolling pin";
T "household item";
Tv "appliance";
T "blog";
T "post";
T "tweet";
|] and thingp = R [|
T "clarinets";
T "pianos";
T "deadly weapons";
T "firearms";
T "weapons";
T "sex dolls";
T "rhinoceri";
T "farm animals";
T "landmines";
T "rocket launchers";
................................................................................
T "rifles";
T "vibrator";
T "handcuffs";
Tv "assault rifles";
Tv "assault weapons";
Tv "automatic weapons";
Tv "artifacts";
Tv "orbs";
T "hazardous materials";
T "gender";
T "cursed objects";
Tv "infectious diseases";
Tv "internet access";
T "nuclear material";
................................................................................
T "rolling pins";
T "household items";
Tv "appliances";
T "stolen property";
T "blogs";
T "posts";
T "tweets";
|] and profession = R [|
T "public official";
Tv "officer of the law";
T "justice of the peace";
T "locksmith";
T "blacksmith";
T "silversmith";
................................................................................
T "second-degree";
T "third-degree";
T "culpable and reckless";
T "criminal";
T "illegal";
T "forcible";
T "fractal";
|] and suffix = R [|
B [ T "with intent to commit"; crime ];
T "in a public place";
T "in a court of law";
T "on public transit";
T "on the high seas";
Tv "in anger";
................................................................................
O(T "hereby");
R[|T "sentence"; T "condemn"|];
R[| T "you"; T "the defendant"; T "the accused party";|];
];
|];
T "to";
]
let condemnation = B[
sentence;
R[|
B[
T "die";
O(T "screaming");
O(T "in agony");
O(B[
T "by";
O(T "prolonged");
O(T "ritual");
O(T "public");
R[| T "beheading"; T "strangulation"; T "torture";
T "industrial negligence"; T "slow slicing"; T "lethal injection";
T "disembowelment"; T "drowning"; T "burning";
T "burning at the stake"; T "emasculation"; T "irradiation";
T "stabbing"; T "poisoning"; T "flaying"; T "roasting";
T "boiling"; T "boiling in oil"; T "boiling in acid";
T "crucifixion"; |]
]);
];
T "hang";
T "hang until dead";
T "hang until you are dead";
T "be drawn and quartered";
T "drown";
T "burn";
T "burn at the stake";
T "be burned";
T "be burned at the stake";
T "be broken on the wheel";
T "be torn apart by wild horses";
|];
O(R[|
B[
T "at";
R[|
T "dawn"; T "dusk"; T "noon"; T "high noon"; T "sunrise"; T "sunset";
|]
................................................................................
T "within one week";
T "within the hour";
T "by day's end";
|])
]
let imprisonment = B[
sentence;
R[|
B[
R[|T "two"; T "three"; T "four"; T "five"; T "six"; T "seven";
Tv "eight"; T "nine"; T "ten";|];
R[|T "seconds"; T "minutes"; T "days"; T "weeks"; T "years"; T "decades"; T "millennia";
T "hundred years"; T "thousand years"; Tv "eons"; Tv "ages"; Tv "eras"; T "million years";
T "billion years"; T "trillion years"; |];
................................................................................
|];
];
|];
T "to";
R[|
B[T "perform"; R[|T "one"; numbers;|]; T "hundred jumping jacks"];
T "make amends";
T "beg forgiveness";
T "do the right thing";
T "bleed";
T "sacrifice your firstborn";
T "forever quit the land of your birth";
B[
T "pay a fine of";
numbers; (* TODO better numbers *)
................................................................................
T "Heaven and all its angels"; T "our Creator"; T "the Maker"; T "the spirits";
|];
P ",";
]);
R[|
B[court;
O(T "hereby");
R[| T "finds"; T "declares"; T "proclaims"; T "pronounces"; T "judges"; Tv "adjuges";|];
];
B[Tv "I";
O(T "hereby");
R[| T "find"; T "declare"; T "proclaim"; T "pronounce"; T "judge"; Tv "adjudge"|];
]
|];
R[| T "you"; T "the defendant"; T "the accused party";|];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
<
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
|
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
...
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
...
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
...
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
...
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
...
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
...
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
...
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
...
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
...
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
...
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
|
let range min max = (Random.int (max-min)) + min
let chance n = range 0 n = 0
let pick (r: 'a array) : 'a = r.(range 0 (Array.length r));;
module CrimeDrug = struct
let frics = [| "f"; "sh"; "th"; |]
let vfrics = [| "z"; "v"; "zh"; |]
let stops = [| "t"; "p"; "k"; "c"; |]
let vstops = [| "d"; "b"; "g"; "gh"; |]
let withglide r f = Array.map (fun i -> i^f) r
let withonset r o = Array.map (fun i -> o^i) r
let consonants = Array.concat [
frics; vfrics; stops; vstops;
withonset stops "s";
[| "w"; "r"; "rh"; "s"; "l"; "ch"; "n"; "m"; |];
]
let initials = Array.concat [
consonants;
withglide frics "r"; withglide frics "l"; withglide frics "w";
withglide stops "r"; withglide vstops "r"; withglide vstops "w";
[| "qu"; "spr"; "spl"; "str"; "scr"; "scl"; "squ"; "bl"; "gl"; "sn"; "sm"; "j"; "h"; "sph"; "ph";|];
]
let nuclei = [| "e"; "ee"; "i"; "a"; "ou"; "u"; "oo"; "ea"; "oa"; "ai"; "oi"; "ie";|]
let finals = Array.concat [
vstops;
withonset stops "s"; withonset stops "r"; withonset stops "l";
withonset vstops "r"; withonset vstops "l";
[| "gh"; "ck"; "ce"; "ss"; "se"; "nd"; "mb"; "mph"; "nk"; "tch"; "ke"; "ght";
"ff"; "ll"; "zz"; "t"; "p"; "th"; "rth"; "lth"; "dge"; "nge"; "ng"; "ft"; "ckle"; "ngle"; "rkle";
"scht"; "ze"; "x"; "sh"; "rsh"; "lsh"; "ggle"; "ddle"; "bble"; "pple"; "rge"; "lge"; "ve"; "rve";
"lve"; "ffle"; "ttle"; "kle"; "sch"; "m"; "n"; "rm"; "lm"; "rn"; "ln";|]
]
let prefixes = [| A "crack"; A "crystal"; A "powdered"; A"raw"; A "pure"; A "liquid";
A"street"; A "super"; An "electric"; A "diced"; A "homemade"; A "traditional";
An "old-school"; A "purified"; A "high-caliber"; A "high-octane"; An "old-fashioned";
A "good old"; A "honest-to-god"; A "weapons-grade"; A "soviet"; An "american";
A "canadian"; A "british"; A "russian"; A "synthetic"; A "french"; A "cyber"; |]
let makeA i x = A(i ^ x)
let makeAn x = An x
let maybeConcat x y = match x with
| Some t -> wconcat t y
| None -> y
let gen () : word = maybeConcat (if chance 3 then Some (pick prefixes) else None)
((if chance 5 then makeAn else makeA (pick initials))
((pick nuclei) ^ (pick finals)))
end
let rec crime = R [|
Tv "arson";
T "murder";
T "jaywalking";
T "larceny";
................................................................................
T "war profiteering";
T "blackmail";
T "cybercrime";
T "espionage";
T "hijacking";
T "hooliganism";
T "perjury";
T "snakes";
T "perpetuation of a ruckus";
T "perpetuation of a nuisance";
T "perpetuation of a public nuisance";
T "refusal to serve in a public office";
B [ T "failure to appear before"; Indef; profession ];
B [ T "refusal to serve as"; Indef; profession ];
B [ T "stalking"; O(T"of"); Indef; profession ];
B [ T "solicitation of"; Indef; profession ];
B [ T "bribery of"; Indef; profession; ];
B [ T "cruelty to"; Indef; profession; ];
................................................................................
B [ T "receiving stolen"; thingp ];
B [ T "deploying"; Indef; thing ];
T "being horny";
T "marketing";
T "advertising";
T "unlawful restraint";
T "trespassing";
T "creating a nuisance";
T "creating a public nuisance";
T "causing a ruckus";
|] and doing = R [|
Tv "entering";
T "decorating";
Tv "invoking";
Tv "evoking";
Tv "insulting";
Tv "advertising";
T "mentoring";
T "bantering";
T "yiffing";
T "posting";
T "tweeting";
T "blogging";
T "hollering";
T "yelling";
T "bartering";
T "matriculating";
T "berating";
T "bothering";
T "irritating";
T "copulating";
T "titillating";
T "aggravating";
|] and practice = R [|
T "falconry";
T "dentistry";
T "philosophy";
T "linguistics";
T "conjuration";
Tv "illusion";
T "mathematics";
T "set theory";
T "math";
T "physics";
Tv "astrophysics";
T "natural philosophy";
T "chemistry";
T "engineering";
T "marketing";
T "advertising";
T "blogging";
T "tweeting";
................................................................................
|] and instrument = R [|
T "clarinet";
T "piano";
Tv "oboe";
T "flute";
T "violin";
|] and thing = R [|
T "clarinet";
T "piano";
T "deadly weapon";
T "dread weapon";
T "firearm";
T "weapon";
T "sex doll";
T "rhinocerous";
T "farm animal";
T "landmine";
T "rocket launcher";
T "rocket-propelled grenade";
T "grenade";
T "ballistic missile";
T "ICBM";
T "rifle";
T "vibrator";
Tv "assault rifle";
Tv "assault weapon";
Tv "automatic weapon";
Tv "artifact";
Tv "dread artifact";
Tv "cursed artifact";
Tv "orb";
T "cursed object";
Tv "infectious disease";
T "nuclear weapon";
T "bioweapon";
T "chemical weapon";
T "memetic hazard";
T "metaphor";
T "simile";
Tv "analogy";
T "turkey baster";
T "rolling pin";
T "household item";
Tv "appliance";
T "blog";
T "post";
T "tweet";
T "snake";
|] and thingp = R [|
T "clarinets";
T "pianos";
T "deadly weapons";
T "dread weapons";
T "firearms";
T "weapons";
T "sex dolls";
T "rhinoceri";
T "farm animals";
T "landmines";
T "rocket launchers";
................................................................................
T "rifles";
T "vibrator";
T "handcuffs";
Tv "assault rifles";
Tv "assault weapons";
Tv "automatic weapons";
Tv "artifacts";
Tv "dread artifacts";
Tv "cursed artifacts";
Tv "orbs";
T "hazardous materials";
T "gender";
T "cursed objects";
Tv "infectious diseases";
Tv "internet access";
T "nuclear material";
................................................................................
T "rolling pins";
T "household items";
Tv "appliances";
T "stolen property";
T "blogs";
T "posts";
T "tweets";
T "snakes";
|] and profession = R [|
T "public official";
Tv "officer of the law";
T "justice of the peace";
T "locksmith";
T "blacksmith";
T "silversmith";
................................................................................
T "second-degree";
T "third-degree";
T "culpable and reckless";
T "criminal";
T "illegal";
T "forcible";
T "fractal";
T "obnoxious";
|] and suffix = R [|
B [ T "with intent to commit"; crime ];
T "in a public place";
T "in a court of law";
T "on public transit";
T "on the high seas";
Tv "in anger";
................................................................................
O(T "hereby");
R[|T "sentence"; T "condemn"|];
R[| T "you"; T "the defendant"; T "the accused party";|];
];
|];
T "to";
]
let determiner = [| T "your"; T "your own"; T "the"; |]
let sdet = R (Array.concat [ determiner; [| T "a"; T "this"; T "that"; |] ])
let pdet = R (Array.concat [ determiner; [| T "these"; T "those"; |] ])
let condemnation = B[
sentence;
R[|
B[ T "die";
O(T "screaming");
O(T "in agony");
O(B[
T "by";
O(T "prolonged");
O(T "ritual");
O(T "public");
R[| T "beheading"; T "strangulation"; T "torture";
T "industrial negligence"; T "slow slicing"; T "lethal injection";
T "disembowelment"; T "drowning"; T "drowning at sea"; T "burning";
T "burning at the stake"; T "emasculation"; T "irradiation";
T "stabbing"; T "poisoning"; T "flaying"; T "roasting";
T "boiling"; T "boiling in oil"; T "boiling in acid";
T "crucifixion"; |]
]);
];
T "hang";
T "hang until dead";
T "hang until you are dead";
T "be drawn and quartered";
T "drown";
T "drown at sea";
T "burn";
T "burn at the stake";
T "be burned";
T "be burned at the stake";
T "be broken on the wheel";
T "be torn apart by wild horses";
T "snakes";
B[ R[|
T "forfeit";
T "be deprived of";
T "be given";
T "be subjected to";
|];
R[|
B[ O(pdet); thingp; ];
B[ sdet; thing; ];
|]
]
|];
O(R[|
B[
T "at";
R[|
T "dawn"; T "dusk"; T "noon"; T "high noon"; T "sunrise"; T "sunset";
|]
................................................................................
T "within one week";
T "within the hour";
T "by day's end";
|])
]
let imprisonment = B[
sentence;
O( T "spend" );
R[|
B[
R[|T "two"; T "three"; T "four"; T "five"; T "six"; T "seven";
Tv "eight"; T "nine"; T "ten";|];
R[|T "seconds"; T "minutes"; T "days"; T "weeks"; T "years"; T "decades"; T "millennia";
T "hundred years"; T "thousand years"; Tv "eons"; Tv "ages"; Tv "eras"; T "million years";
T "billion years"; T "trillion years"; |];
................................................................................
|];
];
|];
T "to";
R[|
B[T "perform"; R[|T "one"; numbers;|]; T "hundred jumping jacks"];
T "make amends";
T "beg for forgiveness";
T "do the right thing";
T "bleed";
T "sacrifice your firstborn";
T "forever quit the land of your birth";
B[
T "pay a fine of";
numbers; (* TODO better numbers *)
................................................................................
T "Heaven and all its angels"; T "our Creator"; T "the Maker"; T "the spirits";
|];
P ",";
]);
R[|
B[court;
O(T "hereby");
R[| T "finds"; T "declares"; T "proclaims"; T "pronounces"; T "judges"; Tv "adjudges";|];
];
B[Tv "I";
O(T "hereby");
R[| T "find"; T "declare"; T "proclaim"; T "pronounce"; T "judge"; Tv "adjudge"|];
]
|];
R[| T "you"; T "the defendant"; T "the accused party";|];
|