-
Notifications
You must be signed in to change notification settings - Fork 1
/
data.ml
90 lines (86 loc) · 3.55 KB
/
data.ml
1
2
3
4
5
6
7
8
9
10
11
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
(** The database containing the words. *)
let distinguish tbl l =
let module S = Sequence in
let front =
l |> S.of_list
|> S.uniq ~eq:CCString.equal
|> S.filter_map (CCHashtbl.get tbl)
in
CCHashtbl.to_seq tbl
|> S.filter (fun (x,_) -> not @@ List.mem x l)
|> S.map snd
|> S.to_array
|> (fun a -> CCArray.shuffle a ; S.of_array a)
|> S.append front
(** A list of [tag list * string]
where tag is http://tools.ietf.org/html/bcp47
See http://www.w3.org/International/articles/language-tags/ for a friendly explanation.
*)
(** No, in many languages. *)
let no = CCHashtbl.of_list [
"af" , "Neen." ; (* Afrikaans *)
"am" , "لا" ; (* Amharic *)
"be" , "Не." ; (* Belarusian *)
"ber" , "Uhu." ; (* Berber languages *)
"bn" , "না।" ; (* Bengali *)
"ca" , "No." ; (* Catalan *)
"cmn" , "不是。" ; (* Mandarin Chinese *)
"cs" , "Ne." ; (* Czech *)
"cv" , "Тӗрӗс мар" ; (* Chuvash *)
"da" , "Nej." ; (* Danish *)
"de" , "Nein." ; (* German *)
"ekk" , "Ei." ; (* Standard Estonian *)
"el" , "Óχι" ; (* Modern Greek *)
"en" , "No." ; (* English *)
"eo" , "Ne." ; (* Esperanto *)
"es" , "No." ; (* Spanish, Castilian *)
"fi" , "Ei." ; (* Finnish *)
"fr" , "Non." ; (* French *)
"gu" , "ના." ; (* Gujarati *)
"he" , "לא" ; (* Hebrew *)
"hi" , "नहीं" ; (* Hindi *)
"hu" , "Nem." ; (* Hungarian *)
"ia" , "No." ; (* Interlingua *)
"id" , "Tidak." ; (* Indonesian *)
"is" , "Nei." ; (* Icelandic *)
"it" , "No." ; (* Italian *)
"ja" , "いいえ。" ; (* Japanese *)
"jbo" , "na go'i" ; (* Lojban *)
"kk" , "Жоқ." ; (* Kazakh *)
"kn" , "ಇಲ್ಲ" ; (* Kannada *)
"la" , "Non est." ; (* Latin *)
"lb" , "Neen." ; (* Luxembourgish, Letzeburgesch *)
"lt" , "Ne." ; (* Lithuanian *)
"lvs" , "Nē." ; (* Standard Latvian *)
"lzh" , "非也。" ; (* Literary Chinese *)
"mr" , "नाही." ; (* Marathi *)
"mt" , "Le." ; (* Maltese *)
"nds" , "Nee." ; (* Low German, Low Saxon *)
"nl" , "Neen." ; (* Dutch, Flemish *)
"nn" , "Nei." ; (* Norwegian Nynorsk *)
"nb" , "Nei." ; (* Norwegian Bokmål *)
"npi" , "होईन" ; (* Nepali *)
"pa" , "نیں" ; (* Panjabi, Punjabi *)
"pes" , "نه" ; (* Iranian Persian *)
"prs" , "نه" ; (* Dari, Afghan Persian *)
"pl" , "Nie." ; (* Polish *)
"pt" , "Não." ; (* Portuguese *)
"qya" , "Lau." ; (* Quenia *)
"ro" , "Nu." ; (* Romanian, Moldavian, Moldovan *)
"ro" , "Nu." ; (* Romania *)
"ru" , "Нет." ; (* Russian *)
"sd" , "نا" ; (* Sindhi *)
"sv" , "Nej." ; (* Swedish *)
"te" , "No." ; (* Telugu *)
"tl" , "Hindi." ; (* Tagalog *)
"tlh" , "Qo'." ; (* Klingon *)
(* "tok" , "ala." ; (* Toki Pona, NO LANGUAGE TAG *) *)
"tpi" , "Nogat." ; (* Tok Pisin *)
"tr" , "Hayır." ; (* Turkish *)
"tt" , "Юк." ; (* Tatar *)
"ug" , "ياق" ; (* Uighur, Uyghur *)
"uk" , "Ні." ; (* Ukrainian *)
"ur" , "نہیں" ; (* Urdu *)
"yue" , "唔係。" ; (* Yue Chinese, Cantonese *)
"zsm" , "Tidak." ; (* Standard Malay *)
]