@polyglot-bundles/ms-word-lists 0.3.8 → 0.5.0

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.
@@ -0,0 +1,80 @@
1
+ {
2
+ "id": "a1-colors",
3
+ "name": "Colors",
4
+ "description": "Basic color words in Malay",
5
+ "examGrade": "A1",
6
+ "difficulty": "beginner",
7
+ "category": "colors",
8
+ "words": [
9
+ {
10
+ "id": "ms:vocab:a1:colors:1",
11
+ "word": "merah",
12
+ "translation": "red",
13
+ "partOfSpeech": "adjective",
14
+ "examGrade": "A1"
15
+ },
16
+ {
17
+ "id": "ms:vocab:a1:colors:2",
18
+ "word": "biru",
19
+ "translation": "blue",
20
+ "partOfSpeech": "adjective",
21
+ "examGrade": "A1"
22
+ },
23
+ {
24
+ "id": "ms:vocab:a1:colors:3",
25
+ "word": "hijau",
26
+ "translation": "green",
27
+ "partOfSpeech": "adjective",
28
+ "examGrade": "A1"
29
+ },
30
+ {
31
+ "id": "ms:vocab:a1:colors:4",
32
+ "word": "kuning",
33
+ "translation": "yellow",
34
+ "partOfSpeech": "adjective",
35
+ "examGrade": "A1"
36
+ },
37
+ {
38
+ "id": "ms:vocab:a1:colors:5",
39
+ "word": "hitam",
40
+ "translation": "black",
41
+ "partOfSpeech": "adjective",
42
+ "examGrade": "A1"
43
+ },
44
+ {
45
+ "id": "ms:vocab:a1:colors:6",
46
+ "word": "putih",
47
+ "translation": "white",
48
+ "partOfSpeech": "adjective",
49
+ "examGrade": "A1"
50
+ },
51
+ {
52
+ "id": "ms:vocab:a1:colors:7",
53
+ "word": "oren",
54
+ "translation": "orange",
55
+ "partOfSpeech": "adjective",
56
+ "examGrade": "A1"
57
+ },
58
+ {
59
+ "id": "ms:vocab:a1:colors:8",
60
+ "word": "ungu",
61
+ "translation": "purple",
62
+ "partOfSpeech": "adjective",
63
+ "examGrade": "A1"
64
+ },
65
+ {
66
+ "id": "ms:vocab:a1:colors:9",
67
+ "word": "merah jambu",
68
+ "translation": "pink",
69
+ "partOfSpeech": "adjective",
70
+ "examGrade": "A1"
71
+ },
72
+ {
73
+ "id": "ms:vocab:a1:colors:10",
74
+ "word": "perang",
75
+ "translation": "brown",
76
+ "partOfSpeech": "adjective",
77
+ "examGrade": "A1"
78
+ }
79
+ ]
80
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "id": "a1-family",
3
+ "name": "Family Members",
4
+ "description": "Family member words in Malay",
5
+ "examGrade": "A1",
6
+ "difficulty": "beginner",
7
+ "category": "family",
8
+ "words": [
9
+ {
10
+ "id": "ms:vocab:a1:family-members:1",
11
+ "word": "ibu",
12
+ "translation": "mother",
13
+ "partOfSpeech": "noun",
14
+ "examGrade": "A1"
15
+ },
16
+ {
17
+ "id": "ms:vocab:a1:family-members:2",
18
+ "word": "bapa",
19
+ "translation": "father",
20
+ "partOfSpeech": "noun",
21
+ "examGrade": "A1"
22
+ },
23
+ {
24
+ "id": "ms:vocab:a1:family-members:3",
25
+ "word": "kakak",
26
+ "translation": "older sister",
27
+ "partOfSpeech": "noun",
28
+ "examGrade": "A1"
29
+ },
30
+ {
31
+ "id": "ms:vocab:a1:family-members:4",
32
+ "word": "abang",
33
+ "translation": "older brother",
34
+ "partOfSpeech": "noun",
35
+ "examGrade": "A1"
36
+ },
37
+ {
38
+ "id": "ms:vocab:a1:family-members:5",
39
+ "word": "anak perempuan",
40
+ "translation": "daughter",
41
+ "partOfSpeech": "noun",
42
+ "examGrade": "A1"
43
+ },
44
+ {
45
+ "id": "ms:vocab:a1:family-members:6",
46
+ "word": "anak lelaki",
47
+ "translation": "son",
48
+ "partOfSpeech": "noun",
49
+ "examGrade": "A1"
50
+ },
51
+ {
52
+ "id": "ms:vocab:a1:family-members:7",
53
+ "word": "nenek",
54
+ "translation": "grandmother",
55
+ "partOfSpeech": "noun",
56
+ "examGrade": "A1"
57
+ },
58
+ {
59
+ "id": "ms:vocab:a1:family-members:8",
60
+ "word": "datuk",
61
+ "translation": "grandfather",
62
+ "partOfSpeech": "noun",
63
+ "examGrade": "A1"
64
+ }
65
+ ]
66
+ }
@@ -0,0 +1,80 @@
1
+ {
2
+ "id": "a1-food",
3
+ "name": "Food Basics",
4
+ "description": "Basic food vocabulary in Malay",
5
+ "examGrade": "A1",
6
+ "difficulty": "beginner",
7
+ "category": "food",
8
+ "words": [
9
+ {
10
+ "id": "ms:vocab:a1:food-basics:1",
11
+ "word": "air",
12
+ "translation": "water",
13
+ "partOfSpeech": "noun",
14
+ "examGrade": "A1"
15
+ },
16
+ {
17
+ "id": "ms:vocab:a1:food-basics:2",
18
+ "word": "roti",
19
+ "translation": "bread",
20
+ "partOfSpeech": "noun",
21
+ "examGrade": "A1"
22
+ },
23
+ {
24
+ "id": "ms:vocab:a1:food-basics:3",
25
+ "word": "susu",
26
+ "translation": "milk",
27
+ "partOfSpeech": "noun",
28
+ "examGrade": "A1"
29
+ },
30
+ {
31
+ "id": "ms:vocab:a1:food-basics:4",
32
+ "word": "epal",
33
+ "translation": "apple",
34
+ "partOfSpeech": "noun",
35
+ "examGrade": "A1"
36
+ },
37
+ {
38
+ "id": "ms:vocab:a1:food-basics:5",
39
+ "word": "kopi",
40
+ "translation": "coffee",
41
+ "partOfSpeech": "noun",
42
+ "examGrade": "A1"
43
+ },
44
+ {
45
+ "id": "ms:vocab:a1:food-basics:6",
46
+ "word": "teh",
47
+ "translation": "tea",
48
+ "partOfSpeech": "noun",
49
+ "examGrade": "A1"
50
+ },
51
+ {
52
+ "id": "ms:vocab:a1:food-basics:7",
53
+ "word": "nasi",
54
+ "translation": "rice",
55
+ "partOfSpeech": "noun",
56
+ "examGrade": "A1"
57
+ },
58
+ {
59
+ "id": "ms:vocab:a1:food-basics:8",
60
+ "word": "daging",
61
+ "translation": "meat",
62
+ "partOfSpeech": "noun",
63
+ "examGrade": "A1"
64
+ },
65
+ {
66
+ "id": "ms:vocab:a1:food-basics:9",
67
+ "word": "ikan",
68
+ "translation": "fish",
69
+ "partOfSpeech": "noun",
70
+ "examGrade": "A1"
71
+ },
72
+ {
73
+ "id": "ms:vocab:a1:food-basics:10",
74
+ "word": "sayur-sayuran",
75
+ "translation": "vegetables",
76
+ "partOfSpeech": "noun",
77
+ "examGrade": "A1"
78
+ }
79
+ ]
80
+ }
@@ -0,0 +1,80 @@
1
+ {
2
+ "id": "a1-greetings",
3
+ "name": "Basic Greetings",
4
+ "description": "Basic greeting phrases in Malay",
5
+ "examGrade": "A1",
6
+ "difficulty": "beginner",
7
+ "category": "greetings",
8
+ "words": [
9
+ {
10
+ "id": "ms:vocab:a1:greetings:1",
11
+ "word": "halo",
12
+ "translation": "hello",
13
+ "partOfSpeech": "interjection",
14
+ "examGrade": "A1"
15
+ },
16
+ {
17
+ "id": "ms:vocab:a1:greetings:2",
18
+ "word": "selamat pagi",
19
+ "translation": "good morning",
20
+ "partOfSpeech": "phrase",
21
+ "examGrade": "A1"
22
+ },
23
+ {
24
+ "id": "ms:vocab:a1:greetings:3",
25
+ "word": "selamat malam",
26
+ "translation": "good night",
27
+ "partOfSpeech": "phrase",
28
+ "examGrade": "A1"
29
+ },
30
+ {
31
+ "id": "ms:vocab:a1:greetings:4",
32
+ "word": "selamat tinggal",
33
+ "translation": "goodbye",
34
+ "partOfSpeech": "phrase",
35
+ "examGrade": "A1"
36
+ },
37
+ {
38
+ "id": "ms:vocab:a1:greetings:5",
39
+ "word": "terima kasih",
40
+ "translation": "thank you",
41
+ "partOfSpeech": "phrase",
42
+ "examGrade": "A1"
43
+ },
44
+ {
45
+ "id": "ms:vocab:a1:greetings:6",
46
+ "word": "tolong",
47
+ "translation": "please",
48
+ "partOfSpeech": "phrase",
49
+ "examGrade": "A1"
50
+ },
51
+ {
52
+ "id": "ms:vocab:a1:greetings:7",
53
+ "word": "maaf",
54
+ "translation": "sorry",
55
+ "partOfSpeech": "phrase",
56
+ "examGrade": "A1"
57
+ },
58
+ {
59
+ "id": "ms:vocab:a1:greetings:8",
60
+ "word": "ya",
61
+ "translation": "yes",
62
+ "partOfSpeech": "interjection",
63
+ "examGrade": "A1"
64
+ },
65
+ {
66
+ "id": "ms:vocab:a1:greetings:9",
67
+ "word": "tidak",
68
+ "translation": "no",
69
+ "partOfSpeech": "interjection",
70
+ "examGrade": "A1"
71
+ },
72
+ {
73
+ "id": "ms:vocab:a1:greetings:10",
74
+ "word": "apa khabar",
75
+ "translation": "how are you",
76
+ "partOfSpeech": "phrase",
77
+ "examGrade": "A1"
78
+ }
79
+ ]
80
+ }
@@ -0,0 +1,80 @@
1
+ {
2
+ "id": "a1-numbers",
3
+ "name": "Numbers 1-10",
4
+ "description": "Numbers one through ten in Malay",
5
+ "examGrade": "A1",
6
+ "difficulty": "beginner",
7
+ "category": "numbers",
8
+ "words": [
9
+ {
10
+ "id": "ms:vocab:a1:numbers-1-10:1",
11
+ "word": "satu",
12
+ "translation": "one",
13
+ "partOfSpeech": "number",
14
+ "examGrade": "A1"
15
+ },
16
+ {
17
+ "id": "ms:vocab:a1:numbers-1-10:2",
18
+ "word": "dua",
19
+ "translation": "two",
20
+ "partOfSpeech": "number",
21
+ "examGrade": "A1"
22
+ },
23
+ {
24
+ "id": "ms:vocab:a1:numbers-1-10:3",
25
+ "word": "tiga",
26
+ "translation": "three",
27
+ "partOfSpeech": "number",
28
+ "examGrade": "A1"
29
+ },
30
+ {
31
+ "id": "ms:vocab:a1:numbers-1-10:4",
32
+ "word": "empat",
33
+ "translation": "four",
34
+ "partOfSpeech": "number",
35
+ "examGrade": "A1"
36
+ },
37
+ {
38
+ "id": "ms:vocab:a1:numbers-1-10:5",
39
+ "word": "lima",
40
+ "translation": "five",
41
+ "partOfSpeech": "number",
42
+ "examGrade": "A1"
43
+ },
44
+ {
45
+ "id": "ms:vocab:a1:numbers-1-10:6",
46
+ "word": "enam",
47
+ "translation": "six",
48
+ "partOfSpeech": "number",
49
+ "examGrade": "A1"
50
+ },
51
+ {
52
+ "id": "ms:vocab:a1:numbers-1-10:7",
53
+ "word": "tujuh",
54
+ "translation": "seven",
55
+ "partOfSpeech": "number",
56
+ "examGrade": "A1"
57
+ },
58
+ {
59
+ "id": "ms:vocab:a1:numbers-1-10:8",
60
+ "word": "lapan",
61
+ "translation": "eight",
62
+ "partOfSpeech": "number",
63
+ "examGrade": "A1"
64
+ },
65
+ {
66
+ "id": "ms:vocab:a1:numbers-1-10:9",
67
+ "word": "sembilan",
68
+ "translation": "nine",
69
+ "partOfSpeech": "number",
70
+ "examGrade": "A1"
71
+ },
72
+ {
73
+ "id": "ms:vocab:a1:numbers-1-10:10",
74
+ "word": "sepuluh",
75
+ "translation": "ten",
76
+ "partOfSpeech": "number",
77
+ "examGrade": "A1"
78
+ }
79
+ ]
80
+ }
package/src/levels/a1.ts CHANGED
@@ -18,6 +18,6 @@ export {
18
18
  export type {
19
19
  ExamGrade,
20
20
  WordListDifficulty,
21
- WordListItem,
22
- WordListSet,
21
+ PolyglotWordListItem,
22
+ PolyglotWordListSet,
23
23
  } from "../index.js";
@@ -0,0 +1,16 @@
1
+ import { malayWordListCatalog } from "../index.js";
2
+
3
+ export const a2Descriptors = malayWordListCatalog.getDescriptorsByExamGrade("A2");
4
+
5
+ export {
6
+ getDescriptorById,
7
+ getDescriptorsByCategory,
8
+ getDescriptorsByDifficulty,
9
+ } from "../index.js";
10
+
11
+ export type {
12
+ ExamGrade,
13
+ WordListDifficulty,
14
+ PolyglotWordListItem,
15
+ PolyglotWordListSet,
16
+ } from "../index.js";
@@ -0,0 +1,16 @@
1
+ import { malayWordListCatalog } from "../index.js";
2
+
3
+ export const b1Descriptors = malayWordListCatalog.getDescriptorsByExamGrade("B1");
4
+
5
+ export {
6
+ getDescriptorById,
7
+ getDescriptorsByCategory,
8
+ getDescriptorsByDifficulty,
9
+ } from "../index.js";
10
+
11
+ export type {
12
+ ExamGrade,
13
+ WordListDifficulty,
14
+ PolyglotWordListItem,
15
+ PolyglotWordListSet,
16
+ } from "../index.js";
package/src/vocab.ts ADDED
@@ -0,0 +1,28 @@
1
+ import { malayWordListCatalog } from "./index.js";
2
+ import type { WordListItem } from "@syllst/word-lists";
3
+
4
+ export type VocabEntry = WordListItem & { id: string };
5
+
6
+ export async function getVocabById(id: string): Promise<VocabEntry | undefined> {
7
+ for (const descriptor of malayWordListCatalog.descriptors) {
8
+ const set = await descriptor.load();
9
+ const word = set.words.find((w) => w.id === id);
10
+ if (word?.id) return word as VocabEntry;
11
+ }
12
+ return undefined;
13
+ }
14
+
15
+ export async function getAllVocabEntries(): Promise<VocabEntry[]> {
16
+ const seen = new Set<string>();
17
+ const entries: VocabEntry[] = [];
18
+ for (const descriptor of malayWordListCatalog.descriptors) {
19
+ const set = await descriptor.load();
20
+ for (const word of set.words) {
21
+ if (word.id && !seen.has(word.id)) {
22
+ seen.add(word.id);
23
+ entries.push(word as VocabEntry);
24
+ }
25
+ }
26
+ }
27
+ return entries;
28
+ }
@@ -1,60 +0,0 @@
1
- {
2
- "id": "a1-basic-greetings",
3
- "name": "Basic Greetings",
4
- "desc": "Basic greeting phrases in Malay",
5
- "cat": "greetings",
6
- "level": "A1",
7
- "difficulty": "beginner",
8
- "words": [
9
- {
10
- "word": "halo",
11
- "translation": "hello",
12
- "partOfSpeech": "interjection"
13
- },
14
- {
15
- "word": "selamat pagi",
16
- "translation": "good morning",
17
- "partOfSpeech": "phrase"
18
- },
19
- {
20
- "word": "selamat malam",
21
- "translation": "good night",
22
- "partOfSpeech": "phrase"
23
- },
24
- {
25
- "word": "selamat tinggal",
26
- "translation": "goodbye",
27
- "partOfSpeech": "phrase"
28
- },
29
- {
30
- "word": "terima kasih",
31
- "translation": "thank you",
32
- "partOfSpeech": "phrase"
33
- },
34
- {
35
- "word": "tolong",
36
- "translation": "please",
37
- "partOfSpeech": "phrase"
38
- },
39
- {
40
- "word": "maaf",
41
- "translation": "sorry",
42
- "partOfSpeech": "phrase"
43
- },
44
- {
45
- "word": "ya",
46
- "translation": "yes",
47
- "partOfSpeech": "interjection"
48
- },
49
- {
50
- "word": "tidak",
51
- "translation": "no",
52
- "partOfSpeech": "interjection"
53
- },
54
- {
55
- "word": "apa khabar",
56
- "translation": "how are you",
57
- "partOfSpeech": "phrase"
58
- }
59
- ]
60
- }
@@ -1,60 +0,0 @@
1
- {
2
- "id": "a1-colors",
3
- "name": "Colors",
4
- "desc": "Basic color words in Malay",
5
- "cat": "colors",
6
- "level": "A1",
7
- "difficulty": "beginner",
8
- "words": [
9
- {
10
- "word": "merah",
11
- "translation": "red",
12
- "partOfSpeech": "adjective"
13
- },
14
- {
15
- "word": "biru",
16
- "translation": "blue",
17
- "partOfSpeech": "adjective"
18
- },
19
- {
20
- "word": "hijau",
21
- "translation": "green",
22
- "partOfSpeech": "adjective"
23
- },
24
- {
25
- "word": "kuning",
26
- "translation": "yellow",
27
- "partOfSpeech": "adjective"
28
- },
29
- {
30
- "word": "hitam",
31
- "translation": "black",
32
- "partOfSpeech": "adjective"
33
- },
34
- {
35
- "word": "putih",
36
- "translation": "white",
37
- "partOfSpeech": "adjective"
38
- },
39
- {
40
- "word": "oren",
41
- "translation": "orange",
42
- "partOfSpeech": "adjective"
43
- },
44
- {
45
- "word": "ungu",
46
- "translation": "purple",
47
- "partOfSpeech": "adjective"
48
- },
49
- {
50
- "word": "merah jambu",
51
- "translation": "pink",
52
- "partOfSpeech": "adjective"
53
- },
54
- {
55
- "word": "perang",
56
- "translation": "brown",
57
- "partOfSpeech": "adjective"
58
- }
59
- ]
60
- }
@@ -1,50 +0,0 @@
1
- {
2
- "id": "a1-family-members",
3
- "name": "Family Members",
4
- "desc": "Family member words in Malay",
5
- "cat": "family",
6
- "level": "A1",
7
- "difficulty": "beginner",
8
- "words": [
9
- {
10
- "word": "ibu",
11
- "translation": "mother",
12
- "partOfSpeech": "noun"
13
- },
14
- {
15
- "word": "bapa",
16
- "translation": "father",
17
- "partOfSpeech": "noun"
18
- },
19
- {
20
- "word": "kakak",
21
- "translation": "older sister",
22
- "partOfSpeech": "noun"
23
- },
24
- {
25
- "word": "abang",
26
- "translation": "older brother",
27
- "partOfSpeech": "noun"
28
- },
29
- {
30
- "word": "anak perempuan",
31
- "translation": "daughter",
32
- "partOfSpeech": "noun"
33
- },
34
- {
35
- "word": "anak lelaki",
36
- "translation": "son",
37
- "partOfSpeech": "noun"
38
- },
39
- {
40
- "word": "nenek",
41
- "translation": "grandmother",
42
- "partOfSpeech": "noun"
43
- },
44
- {
45
- "word": "datuk",
46
- "translation": "grandfather",
47
- "partOfSpeech": "noun"
48
- }
49
- ]
50
- }
@@ -1,60 +0,0 @@
1
- {
2
- "id": "a1-food-basics",
3
- "name": "Food Basics",
4
- "desc": "Basic food vocabulary in Malay",
5
- "cat": "food",
6
- "level": "A1",
7
- "difficulty": "beginner",
8
- "words": [
9
- {
10
- "word": "air",
11
- "translation": "water",
12
- "partOfSpeech": "noun"
13
- },
14
- {
15
- "word": "roti",
16
- "translation": "bread",
17
- "partOfSpeech": "noun"
18
- },
19
- {
20
- "word": "susu",
21
- "translation": "milk",
22
- "partOfSpeech": "noun"
23
- },
24
- {
25
- "word": "epal",
26
- "translation": "apple",
27
- "partOfSpeech": "noun"
28
- },
29
- {
30
- "word": "kopi",
31
- "translation": "coffee",
32
- "partOfSpeech": "noun"
33
- },
34
- {
35
- "word": "teh",
36
- "translation": "tea",
37
- "partOfSpeech": "noun"
38
- },
39
- {
40
- "word": "nasi",
41
- "translation": "rice",
42
- "partOfSpeech": "noun"
43
- },
44
- {
45
- "word": "daging",
46
- "translation": "meat",
47
- "partOfSpeech": "noun"
48
- },
49
- {
50
- "word": "ikan",
51
- "translation": "fish",
52
- "partOfSpeech": "noun"
53
- },
54
- {
55
- "word": "sayur-sayuran",
56
- "translation": "vegetables",
57
- "partOfSpeech": "noun"
58
- }
59
- ]
60
- }