henkan 0.1.0 → 0.1.2
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/dist/index.cjs.js +43 -5
- package/dist/index.cjs.js.map +3 -3
- package/dist/index.mjs +43 -5
- package/dist/index.mjs.map +3 -3
- package/dist/types/types.d.ts +14 -0
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils.d.ts +2 -1
- package/dist/types/utils.d.ts.map +1 -1
- package/docs/api/functions/capitalizeString.md +1 -1
- package/docs/api/functions/convertJMdict.md +8 -2
- package/docs/api/functions/convertKanjiDic.md +1 -1
- package/docs/api/functions/convertKradFile.md +1 -1
- package/docs/api/functions/convertRadkFile.md +1 -1
- package/docs/api/functions/convertTanakaCorpus.md +1 -1
- package/docs/api/functions/generateAnkiNote.md +1 -1
- package/docs/api/functions/generateAnkiNotesFile.md +1 -1
- package/docs/api/functions/getKanji.md +1 -1
- package/docs/api/functions/getKanjiExtended.md +1 -1
- package/docs/api/functions/getWord.md +1 -1
- package/docs/api/functions/isStringArray.md +1 -1
- package/docs/api/functions/isValidArray.md +1 -1
- package/docs/api/functions/isValidArrayWithFirstElement.md +1 -1
- package/docs/api/functions/makeSSML.md +1 -1
- package/docs/api/functions/shuffleArray.md +1 -1
- package/docs/api/functions/synthesizeSpeech.md +1 -1
- package/docs/api/interfaces/DictKanji.md +4 -4
- package/docs/api/interfaces/DictKanjiForm.md +4 -4
- package/docs/api/interfaces/DictKanjiMisc.md +5 -5
- package/docs/api/interfaces/DictKanjiReading.md +3 -3
- package/docs/api/interfaces/DictKanjiReadingMeaning.md +3 -3
- package/docs/api/interfaces/DictKanjiReadingMeaningGroup.md +3 -3
- package/docs/api/interfaces/DictKanjiWithRadicals.md +3 -3
- package/docs/api/interfaces/DictMeaning.md +11 -11
- package/docs/api/interfaces/DictRadical.md +4 -4
- package/docs/api/interfaces/DictReading.md +5 -5
- package/docs/api/interfaces/DictWord.md +27 -5
- package/docs/api/interfaces/ExamplePart.md +7 -7
- package/docs/api/interfaces/Grammar.md +28 -14
- package/docs/api/interfaces/GrammarMeaning.md +3 -3
- package/docs/api/interfaces/Kana.md +24 -10
- package/docs/api/interfaces/Kanji.md +34 -20
- package/docs/api/interfaces/KanjiComponent.md +3 -3
- package/docs/api/interfaces/KanjiForm.md +3 -3
- package/docs/api/interfaces/Phrase.md +4 -4
- package/docs/api/interfaces/Radical.md +29 -15
- package/docs/api/interfaces/Reading.md +4 -4
- package/docs/api/interfaces/ResultEntry.md +16 -6
- package/docs/api/interfaces/TanakaExample.md +5 -5
- package/docs/api/interfaces/Translation.md +3 -3
- package/docs/api/interfaces/UsefulRegExps.md +9 -9
- package/docs/api/interfaces/Word.md +27 -13
- package/docs/api/type-aliases/Dict.md +1 -1
- package/docs/api/type-aliases/DictName.md +1 -1
- package/docs/api/type-aliases/EntryType.md +1 -1
- package/docs/api/type-aliases/JLPT.md +1 -1
- package/docs/api/type-aliases/Result.md +1 -1
- package/package.json +2 -2
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: UsefulRegExps
|
|
8
8
|
|
|
9
|
-
Defined in: [types.ts:
|
|
9
|
+
Defined in: [types.ts:701](https://github.com/Ronokof/Henkan/blob/cdcdfbcc72ca03339cd98398efd7d5e82826d66f/src/types.ts#L701)
|
|
10
10
|
|
|
11
11
|
Some useful regular expressions
|
|
12
12
|
|
|
@@ -16,7 +16,7 @@ Some useful regular expressions
|
|
|
16
16
|
|
|
17
17
|
> `readonly` **hiragana**: `RegExp`
|
|
18
18
|
|
|
19
|
-
Defined in: [types.ts:
|
|
19
|
+
Defined in: [types.ts:705](https://github.com/Ronokof/Henkan/blob/cdcdfbcc72ca03339cd98398efd7d5e82826d66f/src/types.ts#L705)
|
|
20
20
|
|
|
21
21
|
Matches any *hiragana* character(s)
|
|
22
22
|
|
|
@@ -26,7 +26,7 @@ Matches any *hiragana* character(s)
|
|
|
26
26
|
|
|
27
27
|
> `readonly` **kanji**: `RegExp`
|
|
28
28
|
|
|
29
|
-
Defined in: [types.ts:
|
|
29
|
+
Defined in: [types.ts:713](https://github.com/Ronokof/Henkan/blob/cdcdfbcc72ca03339cd98398efd7d5e82826d66f/src/types.ts#L713)
|
|
30
30
|
|
|
31
31
|
Matches any *kanji* character(s)
|
|
32
32
|
|
|
@@ -36,7 +36,7 @@ Matches any *kanji* character(s)
|
|
|
36
36
|
|
|
37
37
|
> `readonly` **katakana**: `RegExp`
|
|
38
38
|
|
|
39
|
-
Defined in: [types.ts:
|
|
39
|
+
Defined in: [types.ts:709](https://github.com/Ronokof/Henkan/blob/cdcdfbcc72ca03339cd98398efd7d5e82826d66f/src/types.ts#L709)
|
|
40
40
|
|
|
41
41
|
Matches any *katakana* character(s)
|
|
42
42
|
|
|
@@ -46,7 +46,7 @@ Matches any *katakana* character(s)
|
|
|
46
46
|
|
|
47
47
|
> `readonly` **regExChars**: `RegExp`
|
|
48
48
|
|
|
49
|
-
Defined in: [types.ts:
|
|
49
|
+
Defined in: [types.ts:723](https://github.com/Ronokof/Henkan/blob/cdcdfbcc72ca03339cd98398efd7d5e82826d66f/src/types.ts#L723)
|
|
50
50
|
|
|
51
51
|
Matches any character that is part of the regex syntax
|
|
52
52
|
|
|
@@ -56,7 +56,7 @@ Matches any character that is part of the regex syntax
|
|
|
56
56
|
|
|
57
57
|
> `readonly` **scriptSplit**: `RegExp`
|
|
58
58
|
|
|
59
|
-
Defined in: [types.ts:
|
|
59
|
+
Defined in: [types.ts:719](https://github.com/Ronokof/Henkan/blob/cdcdfbcc72ca03339cd98398efd7d5e82826d66f/src/types.ts#L719)
|
|
60
60
|
|
|
61
61
|
Matches and splits Japanese expressions into different scripts
|
|
62
62
|
|
|
@@ -68,7 +68,7 @@ Used when creating a SSML
|
|
|
68
68
|
|
|
69
69
|
> `readonly` **tanakaID**: `RegExp`
|
|
70
70
|
|
|
71
|
-
Defined in: [types.ts:
|
|
71
|
+
Defined in: [types.ts:727](https://github.com/Ronokof/Henkan/blob/cdcdfbcc72ca03339cd98398efd7d5e82826d66f/src/types.ts#L727)
|
|
72
72
|
|
|
73
73
|
Matches the `#ID=` part in a Tanaka Corpus `examples.utf` file
|
|
74
74
|
|
|
@@ -78,7 +78,7 @@ Matches the `#ID=` part in a Tanaka Corpus `examples.utf` file
|
|
|
78
78
|
|
|
79
79
|
> `readonly` **tanakaPart**: `RegExp`
|
|
80
80
|
|
|
81
|
-
Defined in: [types.ts:
|
|
81
|
+
Defined in: [types.ts:731](https://github.com/Ronokof/Henkan/blob/cdcdfbcc72ca03339cd98398efd7d5e82826d66f/src/types.ts#L731)
|
|
82
82
|
|
|
83
83
|
Matches and splits a part found in the `B` section of a Tanaka Corpus `examples.utf` file
|
|
84
84
|
|
|
@@ -88,6 +88,6 @@ Matches and splits a part found in the `B` section of a Tanaka Corpus `examples.
|
|
|
88
88
|
|
|
89
89
|
> `readonly` **tanakaReferenceID**: `RegExp`
|
|
90
90
|
|
|
91
|
-
Defined in: [types.ts:
|
|
91
|
+
Defined in: [types.ts:735](https://github.com/Ronokof/Henkan/blob/cdcdfbcc72ca03339cd98398efd7d5e82826d66f/src/types.ts#L735)
|
|
92
92
|
|
|
93
93
|
Matches the reference ID element of a Tanaka example part
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: Word
|
|
8
8
|
|
|
9
|
-
Defined in: [types.ts:
|
|
9
|
+
Defined in: [types.ts:584](https://github.com/Ronokof/Henkan/blob/cdcdfbcc72ca03339cd98398efd7d5e82826d66f/src/types.ts#L584)
|
|
10
10
|
|
|
11
11
|
Word information
|
|
12
12
|
|
|
@@ -22,7 +22,7 @@ Converted from [DictWord](DictWord.md)
|
|
|
22
22
|
|
|
23
23
|
> `optional` **common**: `true`
|
|
24
24
|
|
|
25
|
-
Defined in: [types.ts:
|
|
25
|
+
Defined in: [types.ts:610](https://github.com/Ronokof/Henkan/blob/cdcdfbcc72ca03339cd98398efd7d5e82826d66f/src/types.ts#L610)
|
|
26
26
|
|
|
27
27
|
Whether or not the word is common
|
|
28
28
|
|
|
@@ -34,7 +34,7 @@ A word is considered *common* if the [DictWord.readings](DictWord.md#readings) a
|
|
|
34
34
|
|
|
35
35
|
> `optional` **deckPath**: `string`
|
|
36
36
|
|
|
37
|
-
Defined in: [types.ts:
|
|
37
|
+
Defined in: [types.ts:376](https://github.com/Ronokof/Henkan/blob/cdcdfbcc72ca03339cd98398efd7d5e82826d66f/src/types.ts#L376)
|
|
38
38
|
|
|
39
39
|
The full path of the Anki deck
|
|
40
40
|
|
|
@@ -44,11 +44,25 @@ The full path of the Anki deck
|
|
|
44
44
|
|
|
45
45
|
***
|
|
46
46
|
|
|
47
|
+
### doNotCreateNote?
|
|
48
|
+
|
|
49
|
+
> `optional` **doNotCreateNote**: `true`
|
|
50
|
+
|
|
51
|
+
Defined in: [types.ts:384](https://github.com/Ronokof/Henkan/blob/cdcdfbcc72ca03339cd98398efd7d5e82826d66f/src/types.ts#L384)
|
|
52
|
+
|
|
53
|
+
Whether or not this entry should be converted into an Anki note
|
|
54
|
+
|
|
55
|
+
#### Inherited from
|
|
56
|
+
|
|
57
|
+
[`ResultEntry`](ResultEntry.md).[`doNotCreateNote`](ResultEntry.md#donotcreatenote)
|
|
58
|
+
|
|
59
|
+
***
|
|
60
|
+
|
|
47
61
|
### id?
|
|
48
62
|
|
|
49
63
|
> `readonly` `optional` **id**: `string`
|
|
50
64
|
|
|
51
|
-
Defined in: [types.ts:
|
|
65
|
+
Defined in: [types.ts:368](https://github.com/Ronokof/Henkan/blob/cdcdfbcc72ca03339cd98398efd7d5e82826d66f/src/types.ts#L368)
|
|
52
66
|
|
|
53
67
|
ID used for the Anki note ID
|
|
54
68
|
|
|
@@ -62,7 +76,7 @@ ID used for the Anki note ID
|
|
|
62
76
|
|
|
63
77
|
> `optional` **kanji**: [`Kanji`](Kanji.md)[]
|
|
64
78
|
|
|
65
|
-
Defined in: [types.ts:
|
|
79
|
+
Defined in: [types.ts:600](https://github.com/Ronokof/Henkan/blob/cdcdfbcc72ca03339cd98398efd7d5e82826d66f/src/types.ts#L600)
|
|
66
80
|
|
|
67
81
|
A list of kanji used in the kanji forms
|
|
68
82
|
|
|
@@ -72,7 +86,7 @@ A list of kanji used in the kanji forms
|
|
|
72
86
|
|
|
73
87
|
> `optional` **kanjiForms**: [`KanjiForm`](KanjiForm.md)[]
|
|
74
88
|
|
|
75
|
-
Defined in: [types.ts:
|
|
89
|
+
Defined in: [types.ts:596](https://github.com/Ronokof/Henkan/blob/cdcdfbcc72ca03339cd98398efd7d5e82826d66f/src/types.ts#L596)
|
|
76
90
|
|
|
77
91
|
The word kanji forms
|
|
78
92
|
|
|
@@ -82,7 +96,7 @@ The word kanji forms
|
|
|
82
96
|
|
|
83
97
|
> `readonly` `optional` **noteID**: `` `word_${string}` ``
|
|
84
98
|
|
|
85
|
-
Defined in: [types.ts:
|
|
99
|
+
Defined in: [types.ts:364](https://github.com/Ronokof/Henkan/blob/cdcdfbcc72ca03339cd98398efd7d5e82826d66f/src/types.ts#L364)
|
|
86
100
|
|
|
87
101
|
ID used for the resulting Anki note
|
|
88
102
|
|
|
@@ -96,7 +110,7 @@ ID used for the resulting Anki note
|
|
|
96
110
|
|
|
97
111
|
> `optional` **noteTypeName**: `string`
|
|
98
112
|
|
|
99
|
-
Defined in: [types.ts:
|
|
113
|
+
Defined in: [types.ts:372](https://github.com/Ronokof/Henkan/blob/cdcdfbcc72ca03339cd98398efd7d5e82826d66f/src/types.ts#L372)
|
|
100
114
|
|
|
101
115
|
Anki note type name
|
|
102
116
|
|
|
@@ -110,7 +124,7 @@ Anki note type name
|
|
|
110
124
|
|
|
111
125
|
> `optional` **phrases**: [`Phrase`](Phrase.md)[]
|
|
112
126
|
|
|
113
|
-
Defined in: [types.ts:
|
|
127
|
+
Defined in: [types.ts:604](https://github.com/Ronokof/Henkan/blob/cdcdfbcc72ca03339cd98398efd7d5e82826d66f/src/types.ts#L604)
|
|
114
128
|
|
|
115
129
|
Phrases associated to the word
|
|
116
130
|
|
|
@@ -120,7 +134,7 @@ Phrases associated to the word
|
|
|
120
134
|
|
|
121
135
|
> **readings**: [`Reading`](Reading.md)[]
|
|
122
136
|
|
|
123
|
-
Defined in: [types.ts:
|
|
137
|
+
Defined in: [types.ts:588](https://github.com/Ronokof/Henkan/blob/cdcdfbcc72ca03339cd98398efd7d5e82826d66f/src/types.ts#L588)
|
|
124
138
|
|
|
125
139
|
The word readings (in kana)
|
|
126
140
|
|
|
@@ -130,7 +144,7 @@ The word readings (in kana)
|
|
|
130
144
|
|
|
131
145
|
> `optional` **tags**: `string`[]
|
|
132
146
|
|
|
133
|
-
Defined in: [types.ts:
|
|
147
|
+
Defined in: [types.ts:380](https://github.com/Ronokof/Henkan/blob/cdcdfbcc72ca03339cd98398efd7d5e82826d66f/src/types.ts#L380)
|
|
134
148
|
|
|
135
149
|
Tags generated based on the entry's information
|
|
136
150
|
|
|
@@ -144,7 +158,7 @@ Tags generated based on the entry's information
|
|
|
144
158
|
|
|
145
159
|
> `optional` **translations**: [`Translation`](Translation.md)[]
|
|
146
160
|
|
|
147
|
-
Defined in: [types.ts:
|
|
161
|
+
Defined in: [types.ts:592](https://github.com/Ronokof/Henkan/blob/cdcdfbcc72ca03339cd98398efd7d5e82826d66f/src/types.ts#L592)
|
|
148
162
|
|
|
149
163
|
The word translations/senses
|
|
150
164
|
|
|
@@ -154,7 +168,7 @@ The word translations/senses
|
|
|
154
168
|
|
|
155
169
|
> `optional` **usuallyInKana**: `true`
|
|
156
170
|
|
|
157
|
-
Defined in: [types.ts:
|
|
171
|
+
Defined in: [types.ts:616](https://github.com/Ronokof/Henkan/blob/cdcdfbcc72ca03339cd98398efd7d5e82826d66f/src/types.ts#L616)
|
|
158
172
|
|
|
159
173
|
Whether or not the word is typically written in kana alone
|
|
160
174
|
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
> **Dict** = [`DictWord`](../interfaces/DictWord.md)[] \| [`DictKanji`](../interfaces/DictKanji.md)[] \| [`TanakaExample`](../interfaces/TanakaExample.md)[] \| [`DictRadical`](../interfaces/DictRadical.md)[] \| [`DictKanjiWithRadicals`](../interfaces/DictKanjiWithRadicals.md)[]
|
|
10
10
|
|
|
11
|
-
Defined in: [types.ts:
|
|
11
|
+
Defined in: [types.ts:345](https://github.com/Ronokof/Henkan/blob/cdcdfbcc72ca03339cd98398efd7d5e82826d66f/src/types.ts#L345)
|
|
12
12
|
|
|
13
13
|
Any type of entry list
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
> **DictName** = `"JMDict"` \| `"Kanjidic"` \| `"tanaka"` \| `"radk"` \| `"krad"`
|
|
10
10
|
|
|
11
|
-
Defined in: [types.ts:9](https://github.com/Ronokof/Henkan/blob/
|
|
11
|
+
Defined in: [types.ts:9](https://github.com/Ronokof/Henkan/blob/cdcdfbcc72ca03339cd98398efd7d5e82826d66f/src/types.ts#L9)
|
|
12
12
|
|
|
13
13
|
Standardized dictionary names
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
> **EntryType** = `"word"` \| `"kanji"` \| `"radical"` \| `"kana"` \| `"grammar"`
|
|
10
10
|
|
|
11
|
-
Defined in: [types.ts:
|
|
11
|
+
Defined in: [types.ts:355](https://github.com/Ronokof/Henkan/blob/cdcdfbcc72ca03339cd98398efd7d5e82826d66f/src/types.ts#L355)
|
|
12
12
|
|
|
13
13
|
Names of entry types used for the Anki note IDs
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
> **JLPT** = `"N5"` \| `"N4"` \| `"N3"` \| `"N2"` \| `"N1"`
|
|
10
10
|
|
|
11
|
-
Defined in: [types.ts:4](https://github.com/Ronokof/Henkan/blob/
|
|
11
|
+
Defined in: [types.ts:4](https://github.com/Ronokof/Henkan/blob/cdcdfbcc72ca03339cd98398efd7d5e82826d66f/src/types.ts#L4)
|
|
12
12
|
|
|
13
13
|
JLPT levels
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
> **Result** = [`Word`](../interfaces/Word.md) \| [`Kanji`](../interfaces/Kanji.md) \| [`Radical`](../interfaces/Radical.md) \| [`Kana`](../interfaces/Kana.md) \| [`Grammar`](../interfaces/Grammar.md)
|
|
10
10
|
|
|
11
|
-
Defined in: [types.ts:
|
|
11
|
+
Defined in: [types.ts:696](https://github.com/Ronokof/Henkan/blob/cdcdfbcc72ca03339cd98398efd7d5e82826d66f/src/types.ts#L696)
|
|
12
12
|
|
|
13
13
|
Any type of converted entry from a [Dict](Dict.md) array + others not from a dictionary
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "henkan",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "A Node.JS library that helps you convert any dictionary from EDRDG, transform their entries into more user-friendly schemas and create Anki notes from them.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fjsd",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"typescript": "^5.9.3"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@aws-sdk/client-polly": "^3.
|
|
77
|
+
"@aws-sdk/client-polly": "^3.917.0",
|
|
78
78
|
"iconv-lite": "^0.7.0",
|
|
79
79
|
"kuroshiro": "^1.2.0",
|
|
80
80
|
"kuroshiro-analyzer-kuromoji": "^1.1.0",
|