bayda-maghreb 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/dialects/kab.json +109 -7
- package/data/dialects/kabyle-latin.json +108 -13
- package/data/dialects/kabyle.json +112 -0
- package/index.js +12 -11
- package/package.json +1 -1
- package/src/dialect-registry.js +8 -8
package/data/dialects/kab.json
CHANGED
|
@@ -1,10 +1,112 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
2
|
+
"code": "kab",
|
|
3
|
+
"name": "Kabyle",
|
|
3
4
|
"keywords": {
|
|
4
5
|
"ila": "if",
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
"ma_yella": "if",
|
|
7
|
+
"awla": "else",
|
|
8
|
+
"neɣ": "else",
|
|
9
|
+
"ma_ulac": "else",
|
|
10
|
+
"ma_yella_ur": "else if",
|
|
11
|
+
"i": "for",
|
|
12
|
+
"deg": "for",
|
|
13
|
+
"asmi": "while",
|
|
14
|
+
"armi": "while",
|
|
15
|
+
"efk": "do",
|
|
16
|
+
"bedd": "break",
|
|
17
|
+
"kemmel": "continue",
|
|
18
|
+
"afecku": "function",
|
|
19
|
+
"tarrayt": "function",
|
|
20
|
+
"err_d": "return",
|
|
21
|
+
"rra_d": "return",
|
|
22
|
+
"tidet": "true",
|
|
23
|
+
"tikerkas": "false",
|
|
24
|
+
"ulac": "null",
|
|
25
|
+
"ulac_akra": "null",
|
|
26
|
+
"sider": "import",
|
|
27
|
+
"sufɣ": "export",
|
|
28
|
+
"taggayt": "class",
|
|
29
|
+
"amaynur": "new",
|
|
30
|
+
"neki": "this",
|
|
31
|
+
"nec": "this",
|
|
32
|
+
"hat": "let",
|
|
33
|
+
"ili": "let",
|
|
34
|
+
"ur_nbeddel": "const",
|
|
35
|
+
"ahet": "var",
|
|
36
|
+
"asekfel": "try",
|
|
37
|
+
"ttef": "catch",
|
|
38
|
+
"taggara": "finally",
|
|
39
|
+
"ḍegger": "throw",
|
|
40
|
+
"afus": "Array",
|
|
41
|
+
"awalen": "String",
|
|
42
|
+
"umḍan": "Number",
|
|
43
|
+
"tamsirt": "Object",
|
|
44
|
+
"tabadut": "Boolean",
|
|
45
|
+
"tidukla": "Map",
|
|
46
|
+
"agraw": "Set",
|
|
47
|
+
"asizdeg": "filter",
|
|
48
|
+
"asnifel": "map",
|
|
49
|
+
"agmer": "reduce",
|
|
50
|
+
"nadi": "find",
|
|
51
|
+
"af": "get",
|
|
52
|
+
"sbedd": "set",
|
|
53
|
+
"arnu": "push",
|
|
54
|
+
"kkes": "pop",
|
|
55
|
+
"ɣer_teɣzi": "length",
|
|
56
|
+
"meslay": "log",
|
|
57
|
+
"print": "log",
|
|
58
|
+
"awal": "log",
|
|
59
|
+
"seqdec": "sort",
|
|
60
|
+
"beddel": "replace",
|
|
61
|
+
"ferren": "split",
|
|
62
|
+
"seddukel": "join",
|
|
63
|
+
"semsawi": "equal",
|
|
64
|
+
"ameqqran": "greater",
|
|
65
|
+
"ameẓyan": "less",
|
|
66
|
+
"amar": "and",
|
|
67
|
+
"neɣ": "or",
|
|
68
|
+
"ur": "not",
|
|
69
|
+
"yella": "exists",
|
|
70
|
+
"ulac": "empty",
|
|
71
|
+
"seg": "from",
|
|
72
|
+
"ɣer": "to",
|
|
73
|
+
"di": "in",
|
|
74
|
+
"s": "with",
|
|
75
|
+
"ak": "with",
|
|
76
|
+
"ɣef": "on",
|
|
77
|
+
"ddaw": "under",
|
|
78
|
+
"nnig": "above",
|
|
79
|
+
"zdat": "before",
|
|
80
|
+
"deffir": "after",
|
|
81
|
+
"tikli": "loop",
|
|
82
|
+
"tikelt": "iteration",
|
|
83
|
+
"aɣbalu": "source",
|
|
84
|
+
"abrid": "path",
|
|
85
|
+
"isem": "name",
|
|
86
|
+
"azal": "value",
|
|
87
|
+
"tamawt": "type",
|
|
88
|
+
"asumer": "await",
|
|
89
|
+
"raǧu": "async",
|
|
90
|
+
"tazmert": "promise",
|
|
91
|
+
"tuccḍa": "error",
|
|
92
|
+
"tiɣri": "call",
|
|
93
|
+
"asali": "apply",
|
|
94
|
+
"tuqqna": "bind",
|
|
95
|
+
"akal": "global",
|
|
96
|
+
"agmam": "module",
|
|
97
|
+
"tawuri": "process",
|
|
98
|
+
"talɣa": "args",
|
|
99
|
+
"inadi": "index",
|
|
100
|
+
"amḍan": "count",
|
|
101
|
+
"amzwaru": "first",
|
|
102
|
+
"aneggaru": "last",
|
|
103
|
+
"talemmast": "middle",
|
|
104
|
+
"aḥric": "slice",
|
|
105
|
+
"dukel": "concat",
|
|
106
|
+
"ini": "say",
|
|
107
|
+
"steqsi": "prompt",
|
|
108
|
+
"wali": "check",
|
|
109
|
+
"ferren": "parse",
|
|
110
|
+
"suɣel": "stringify"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -1,17 +1,112 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
2
|
+
"code": "kab",
|
|
3
|
+
"name": "Kabyle",
|
|
3
4
|
"keywords": {
|
|
4
5
|
"ila": "if",
|
|
6
|
+
"ma_yella": "if",
|
|
5
7
|
"awla": "else",
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
"neɣ": "else",
|
|
9
|
+
"ma_ulac": "else",
|
|
10
|
+
"ma_yella_ur": "else if",
|
|
11
|
+
"i": "for",
|
|
12
|
+
"deg": "for",
|
|
13
|
+
"asmi": "while",
|
|
14
|
+
"armi": "while",
|
|
15
|
+
"efk": "do",
|
|
16
|
+
"bedd": "break",
|
|
17
|
+
"kemmel": "continue",
|
|
18
|
+
"afecku": "function",
|
|
19
|
+
"tarrayt": "function",
|
|
20
|
+
"err_d": "return",
|
|
21
|
+
"rra_d": "return",
|
|
22
|
+
"tidet": "true",
|
|
23
|
+
"tikerkas": "false",
|
|
24
|
+
"ulac": "null",
|
|
25
|
+
"ulac_akra": "null",
|
|
26
|
+
"sider": "import",
|
|
27
|
+
"sufɣ": "export",
|
|
28
|
+
"taggayt": "class",
|
|
29
|
+
"amaynur": "new",
|
|
30
|
+
"neki": "this",
|
|
31
|
+
"nec": "this",
|
|
32
|
+
"hat": "let",
|
|
33
|
+
"ili": "let",
|
|
34
|
+
"ur_nbeddel": "const",
|
|
35
|
+
"ahet": "var",
|
|
36
|
+
"asekfel": "try",
|
|
37
|
+
"ttef": "catch",
|
|
38
|
+
"taggara": "finally",
|
|
39
|
+
"ḍegger": "throw",
|
|
40
|
+
"afus": "Array",
|
|
41
|
+
"awalen": "String",
|
|
42
|
+
"umḍan": "Number",
|
|
43
|
+
"tamsirt": "Object",
|
|
44
|
+
"tabadut": "Boolean",
|
|
45
|
+
"tidukla": "Map",
|
|
46
|
+
"agraw": "Set",
|
|
47
|
+
"asizdeg": "filter",
|
|
48
|
+
"asnifel": "map",
|
|
49
|
+
"agmer": "reduce",
|
|
50
|
+
"nadi": "find",
|
|
51
|
+
"af": "get",
|
|
52
|
+
"sbedd": "set",
|
|
53
|
+
"arnu": "push",
|
|
54
|
+
"kkes": "pop",
|
|
55
|
+
"ɣer_teɣzi": "length",
|
|
56
|
+
"meslay": "log",
|
|
57
|
+
"print": "log",
|
|
58
|
+
"awal": "log",
|
|
59
|
+
"seqdec": "sort",
|
|
60
|
+
"beddel": "replace",
|
|
61
|
+
"ferren": "split",
|
|
62
|
+
"seddukel": "join",
|
|
63
|
+
"semsawi": "equal",
|
|
64
|
+
"ameqqran": "greater",
|
|
65
|
+
"ameẓyan": "less",
|
|
66
|
+
"amar": "and",
|
|
67
|
+
"neɣ": "or",
|
|
68
|
+
"ur": "not",
|
|
69
|
+
"yella": "exists",
|
|
70
|
+
"ulac": "empty",
|
|
71
|
+
"seg": "from",
|
|
72
|
+
"ɣer": "to",
|
|
73
|
+
"di": "in",
|
|
74
|
+
"s": "with",
|
|
75
|
+
"ak": "with",
|
|
76
|
+
"ɣef": "on",
|
|
77
|
+
"ddaw": "under",
|
|
78
|
+
"nnig": "above",
|
|
79
|
+
"zdat": "before",
|
|
80
|
+
"deffir": "after",
|
|
81
|
+
"tikli": "loop",
|
|
82
|
+
"tikelt": "iteration",
|
|
83
|
+
"aɣbalu": "source",
|
|
84
|
+
"abrid": "path",
|
|
85
|
+
"isem": "name",
|
|
86
|
+
"azal": "value",
|
|
87
|
+
"tamawt": "type",
|
|
88
|
+
"asumer": "await",
|
|
89
|
+
"raǧu": "async",
|
|
90
|
+
"tazmert": "promise",
|
|
91
|
+
"tuccḍa": "error",
|
|
92
|
+
"tiɣri": "call",
|
|
93
|
+
"asali": "apply",
|
|
94
|
+
"tuqqna": "bind",
|
|
95
|
+
"akal": "global",
|
|
96
|
+
"agmam": "module",
|
|
97
|
+
"tawuri": "process",
|
|
98
|
+
"talɣa": "args",
|
|
99
|
+
"inadi": "index",
|
|
100
|
+
"amḍan": "count",
|
|
101
|
+
"amzwaru": "first",
|
|
102
|
+
"aneggaru": "last",
|
|
103
|
+
"talemmast": "middle",
|
|
104
|
+
"aḥric": "slice",
|
|
105
|
+
"dukel": "concat",
|
|
106
|
+
"ini": "say",
|
|
107
|
+
"steqsi": "prompt",
|
|
108
|
+
"wali": "check",
|
|
109
|
+
"ferren": "parse",
|
|
110
|
+
"suɣel": "stringify"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"code": "kab",
|
|
3
|
+
"name": "Kabyle",
|
|
4
|
+
"keywords": {
|
|
5
|
+
"ila": "if",
|
|
6
|
+
"ma_yella": "if",
|
|
7
|
+
"awla": "else",
|
|
8
|
+
"neɣ": "else",
|
|
9
|
+
"ma_ulac": "else",
|
|
10
|
+
"ma_yella_ur": "else if",
|
|
11
|
+
"i": "for",
|
|
12
|
+
"deg": "for",
|
|
13
|
+
"asmi": "while",
|
|
14
|
+
"armi": "while",
|
|
15
|
+
"efk": "do",
|
|
16
|
+
"bedd": "break",
|
|
17
|
+
"kemmel": "continue",
|
|
18
|
+
"afecku": "function",
|
|
19
|
+
"tarrayt": "function",
|
|
20
|
+
"err_d": "return",
|
|
21
|
+
"rra_d": "return",
|
|
22
|
+
"tidet": "true",
|
|
23
|
+
"tikerkas": "false",
|
|
24
|
+
"ulac": "null",
|
|
25
|
+
"ulac_akra": "null",
|
|
26
|
+
"sider": "import",
|
|
27
|
+
"sufɣ": "export",
|
|
28
|
+
"taggayt": "class",
|
|
29
|
+
"amaynur": "new",
|
|
30
|
+
"neki": "this",
|
|
31
|
+
"nec": "this",
|
|
32
|
+
"hat": "let",
|
|
33
|
+
"ili": "let",
|
|
34
|
+
"ur_nbeddel": "const",
|
|
35
|
+
"ahet": "var",
|
|
36
|
+
"asekfel": "try",
|
|
37
|
+
"ttef": "catch",
|
|
38
|
+
"taggara": "finally",
|
|
39
|
+
"ḍegger": "throw",
|
|
40
|
+
"afus": "Array",
|
|
41
|
+
"awalen": "String",
|
|
42
|
+
"umḍan": "Number",
|
|
43
|
+
"tamsirt": "Object",
|
|
44
|
+
"tabadut": "Boolean",
|
|
45
|
+
"tidukla": "Map",
|
|
46
|
+
"agraw": "Set",
|
|
47
|
+
"asizdeg": "filter",
|
|
48
|
+
"asnifel": "map",
|
|
49
|
+
"agmer": "reduce",
|
|
50
|
+
"nadi": "find",
|
|
51
|
+
"af": "get",
|
|
52
|
+
"sbedd": "set",
|
|
53
|
+
"arnu": "push",
|
|
54
|
+
"kkes": "pop",
|
|
55
|
+
"ɣer_teɣzi": "length",
|
|
56
|
+
"meslay": "log",
|
|
57
|
+
"print": "log",
|
|
58
|
+
"awal": "log",
|
|
59
|
+
"seqdec": "sort",
|
|
60
|
+
"beddel": "replace",
|
|
61
|
+
"ferren": "split",
|
|
62
|
+
"seddukel": "join",
|
|
63
|
+
"semsawi": "equal",
|
|
64
|
+
"ameqqran": "greater",
|
|
65
|
+
"ameẓyan": "less",
|
|
66
|
+
"amar": "and",
|
|
67
|
+
"neɣ": "or",
|
|
68
|
+
"ur": "not",
|
|
69
|
+
"yella": "exists",
|
|
70
|
+
"ulac": "empty",
|
|
71
|
+
"seg": "from",
|
|
72
|
+
"ɣer": "to",
|
|
73
|
+
"di": "in",
|
|
74
|
+
"s": "with",
|
|
75
|
+
"ak": "with",
|
|
76
|
+
"ɣef": "on",
|
|
77
|
+
"ddaw": "under",
|
|
78
|
+
"nnig": "above",
|
|
79
|
+
"zdat": "before",
|
|
80
|
+
"deffir": "after",
|
|
81
|
+
"tikli": "loop",
|
|
82
|
+
"tikelt": "iteration",
|
|
83
|
+
"aɣbalu": "source",
|
|
84
|
+
"abrid": "path",
|
|
85
|
+
"isem": "name",
|
|
86
|
+
"azal": "value",
|
|
87
|
+
"tamawt": "type",
|
|
88
|
+
"asumer": "await",
|
|
89
|
+
"raǧu": "async",
|
|
90
|
+
"tazmert": "promise",
|
|
91
|
+
"tuccḍa": "error",
|
|
92
|
+
"tiɣri": "call",
|
|
93
|
+
"asali": "apply",
|
|
94
|
+
"tuqqna": "bind",
|
|
95
|
+
"akal": "global",
|
|
96
|
+
"agmam": "module",
|
|
97
|
+
"tawuri": "process",
|
|
98
|
+
"talɣa": "args",
|
|
99
|
+
"inadi": "index",
|
|
100
|
+
"amḍan": "count",
|
|
101
|
+
"amzwaru": "first",
|
|
102
|
+
"aneggaru": "last",
|
|
103
|
+
"talemmast": "middle",
|
|
104
|
+
"aḥric": "slice",
|
|
105
|
+
"dukel": "concat",
|
|
106
|
+
"ini": "say",
|
|
107
|
+
"steqsi": "prompt",
|
|
108
|
+
"wali": "check",
|
|
109
|
+
"ferren": "parse",
|
|
110
|
+
"suɣel": "stringify"
|
|
111
|
+
}
|
|
112
|
+
}
|
package/index.js
CHANGED
|
@@ -7,7 +7,7 @@ const __filename = fileURLToPath(import.meta.url)
|
|
|
7
7
|
const __dirname = path.dirname(__filename)
|
|
8
8
|
|
|
9
9
|
function load(entry) {
|
|
10
|
-
const p = path.join(__dirname, 'data/dialects', entry.
|
|
10
|
+
const p = path.join(__dirname, 'data/dialects', entry.File)
|
|
11
11
|
const dialect = JSON.parse(fs.readFileSync(p, 'utf8'))
|
|
12
12
|
return dialect
|
|
13
13
|
}
|
|
@@ -24,7 +24,17 @@ export function getAllDialects() {
|
|
|
24
24
|
|
|
25
25
|
export { dialects }
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
export const kab = getDialect('kab')
|
|
28
|
+
export const kabLatn = getDialect('kab-lat')
|
|
29
|
+
export const dz = getDialect('dz')
|
|
30
|
+
export const dzLatn = getDialect('dz-latn')
|
|
31
|
+
export const tnLatn = getDialect('tn-latn')
|
|
32
|
+
export const ma = getDialect('mr')
|
|
33
|
+
export const ly = getDialect('ly')
|
|
34
|
+
export const tif = getDialect('tif')
|
|
35
|
+
|
|
36
|
+
export default { getDialect, getAllDialects, dialects, kab, dz, ly, ma, tif }
|
|
37
|
+
|
|
28
38
|
const arg = process.argv[2] || 'kab'
|
|
29
39
|
if (process.argv[1] && process.argv[1].endsWith('index.js')) {
|
|
30
40
|
if (arg === '--test') {
|
|
@@ -47,12 +57,3 @@ if (process.argv[1] && process.argv[1].endsWith('index.js')) {
|
|
|
47
57
|
}
|
|
48
58
|
}
|
|
49
59
|
}
|
|
50
|
-
|
|
51
|
-
// export default باش يخدم مع require و import
|
|
52
|
-
export default { getDialect, getAllDialects, dialects }
|
|
53
|
-
export const kab = getDialect('kab')
|
|
54
|
-
export const dz = getDialect('dz')
|
|
55
|
-
export const tn = getDialect('tn-latn')
|
|
56
|
-
export const dzLatn = getDialect('dz-latn')
|
|
57
|
-
export const ma = getDialect('mr')
|
|
58
|
-
export const ly = getDialect('ly')
|
package/package.json
CHANGED
package/src/dialect-registry.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export const dialects = [
|
|
2
|
-
{ code: 'kab',
|
|
3
|
-
{ code: 'kab-lat',
|
|
4
|
-
{ code: 'ly',
|
|
5
|
-
{ code: 'mr',
|
|
6
|
-
{ code: 'tif',
|
|
7
|
-
{ code: 'tn-latn',
|
|
8
|
-
{ code: 'dz',
|
|
9
|
-
{ code: 'dz-latn',
|
|
2
|
+
{ code: 'kab', File: 'kabyle.json', name: 'Kabyle' },
|
|
3
|
+
{ code: 'kab-lat', File: 'kabyle-latin.json', name: 'Kabyle Latin' },
|
|
4
|
+
{ code: 'ly', File: 'libya.json', name: 'Libya' },
|
|
5
|
+
{ code: 'mr', File: 'mauritania.json', name: 'Mauritania' },
|
|
6
|
+
{ code: 'tif', File: 'tifinagh.json', name: 'Tifinagh' },
|
|
7
|
+
{ code: 'tn-latn', File: 'tunisia_franco.json', name: 'Tounsi' },
|
|
8
|
+
{ code: 'dz', File: 'algeria.json', name: 'Dzair' },
|
|
9
|
+
{ code: 'dz-latn', File: 'algeria_franco.json', name: 'Dzair Franco' }
|
|
10
10
|
];
|