-
Notifications
You must be signed in to change notification settings - Fork 0
/
makeDictionary.js
61 lines (51 loc) · 2.8 KB
/
makeDictionary.js
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
const fs = require("fs");
const path = require("path");
const numberAndNextCharDictionary = require("./languages/dictionaries/number_and_nextchar.dict.js");
const languageDictionary = {};
const numberDictionary = require("./languages/dictionaries/number.dict.js");
const integerDictionary = require("./languages/dictionaries/integer.dict.js");
const otherDictionary = {};
otherDictionary["charToVowel.csv"] = require("./languages/dictionaries/charToVowel.csv.dict.js");
otherDictionary["float.csv"] = require("./languages/dictionaries/float.csv.dict.js");
otherDictionary["replacejoshi.csv"] = require("./languages/dictionaries/replacejoshi.csv.dict.js");
otherDictionary["romajiHira.csv"] = require("./languages/dictionaries/romajiHira.csv.dict.js");
otherDictionary["charToVowel.csv"] = require("./languages/dictionaries/charToVowel.csv.dict.js");
languageDictionary["Thai"] = require("./languages/dictionaries/Thai.dict.js");
languageDictionary["Russian"] = require("./languages/dictionaries/Russian.dict.js");
languageDictionary["Arabic"] = require("./languages/dictionaries/Arabic.dict.js");
languageDictionary["Korean"] = require("./languages/dictionaries/Korean.dict.js");
languageDictionary["Hindi"] = require("./languages/dictionaries/Hindi.dict.js");
languageDictionary["Tibetan"] = require("./languages/dictionaries/Tibetan.dict.js");
languageDictionary["Hebrew"] = require("./languages/dictionaries/Hebrew.dict.js");
languageDictionary["Khmer"] = require("./languages/dictionaries/Khmer.dict.js");
languageDictionary["Amharic"] = require("./languages/dictionaries/Amharic.dict.js");
languageDictionary["Tamil"] = require("./languages/dictionaries/Tamil.dict.js");
languageDictionary["Armenian"] = require("./languages/dictionaries/Armenian.dict.js");
languageDictionary["Burmese"] = require("./languages/dictionaries/Burmese.dict.js");
languageDictionary["Greek"] = require("./languages/dictionaries/Greek.dict.js");
languageDictionary["Georgian"] = require("./languages/dictionaries/Georgian.dict.js");
languageDictionary["Sinhalese"] = require("./languages/dictionaries/Sinhalese.dict.js");
languageDictionary["Romaji"] = require("./languages/dictionaries/Romaji.dict.js");
languageDictionary["Hiragana"] = require("./languages/dictionaries/Hiragana.dict.js");
function loadLangDictionary(name, includesAdditionalDictionary, differentAtEndOfWord) {
return languageDictionary[name];
}
function loadAllNumberWithNextCharDictionaries(fileName) {
return numberAndNextCharDictionary;
}
function loadNumberDictionary() {
return numberDictionary;
}
function loadIntegerDictionary() {
return integerDictionary;
}
function loadOtherDictionary(fileName) {
return otherDictionary[fileName];
}
module.exports = {
loadLangDictionary,
loadOtherDictionary,
loadAllNumberWithNextCharDictionaries,
loadNumberDictionary,
loadIntegerDictionary,
}