henkan 1.1.2 → 2.0.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.
- package/README.md +1 -1
- package/dist/index.cjs.js +1047 -1115
- package/dist/index.cjs.js.map +3 -3
- package/dist/index.mjs +1042 -1113
- package/dist/index.mjs.map +3 -3
- package/dist/types/constants.d.ts +3 -2
- package/dist/types/constants.d.ts.map +1 -1
- package/dist/types/types.d.ts +74 -15
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils.d.ts +49 -40
- package/dist/types/utils.d.ts.map +1 -1
- package/docs/api/README.md +6 -2
- package/docs/api/functions/capitalizeString.md +1 -1
- package/docs/api/functions/convertJMdict.md +2 -2
- package/docs/api/functions/convertJawiktionaryAsync.md +29 -0
- package/docs/api/functions/convertJawiktionarySync.md +29 -0
- package/docs/api/functions/convertKanjiDic.md +1 -1
- package/docs/api/functions/convertKradFile.md +3 -3
- package/docs/api/functions/convertRadkFile.md +2 -2
- package/docs/api/functions/convertTanakaCorpus.md +3 -9
- package/docs/api/functions/convertTanakaCorpusWithFurigana.md +27 -0
- package/docs/api/functions/generateAnkiNote.md +1 -1
- package/docs/api/functions/generateAnkiNotesFile.md +9 -3
- package/docs/api/functions/getKanji.md +13 -19
- package/docs/api/functions/getKanjiExtended.md +18 -18
- package/docs/api/functions/getWord.md +17 -23
- package/docs/api/functions/getWordDefinitions.md +6 -12
- package/docs/api/functions/getWordDefinitionsWithFurigana.md +33 -0
- 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/shuffleArray.md +2 -2
- package/docs/api/interfaces/DefaultNoteInfo.md +51 -0
- package/docs/api/interfaces/DictKanjiMisc.md +2 -2
- package/docs/api/interfaces/DictKanjiReadingMeaning.md +2 -2
- package/docs/api/interfaces/DictKanjiReadingMeaningGroup.md +4 -4
- package/docs/api/interfaces/DictKanjiWithRadicals.md +2 -2
- package/docs/api/interfaces/DictWord.md +1 -1
- package/docs/api/interfaces/Grammar.md +2 -2
- package/docs/api/interfaces/Kana.md +2 -2
- package/docs/api/interfaces/Kanji.md +12 -12
- package/docs/api/interfaces/NoteAndTag.md +2 -2
- package/docs/api/interfaces/NoteHeaderKeys.md +75 -0
- package/docs/api/interfaces/Radical.md +5 -5
- package/docs/api/interfaces/ResultEntry.md +2 -2
- package/docs/api/interfaces/TanakaExample.md +1 -1
- package/docs/api/interfaces/UsefulRegExps.md +8 -8
- package/docs/api/interfaces/Word.md +2 -2
- package/package.json +11 -12
- package/docs/api/functions/convertJawiktionary.md +0 -29
- package/docs/api/functions/synthesizeSpeech.md +0 -39
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
[**henkan**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[henkan](../README.md) / convertTanakaCorpusWithFurigana
|
|
6
|
+
|
|
7
|
+
# Function: convertTanakaCorpusWithFurigana()
|
|
8
|
+
|
|
9
|
+
> **convertTanakaCorpusWithFurigana**(`tanakaString`): `Promise`\<[`TanakaExample`](../interfaces/TanakaExample.md)[]\>
|
|
10
|
+
|
|
11
|
+
Defined in: [utils.ts:561](https://github.com/Ronokof/Henkan/blob/main/src/utils.ts#L561)
|
|
12
|
+
|
|
13
|
+
Converts a Tanaka Corpus `examples.utf` file into an array of [TanakaExample](../interfaces/TanakaExample.md) objects (with furigana).
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### tanakaString
|
|
18
|
+
|
|
19
|
+
`string`
|
|
20
|
+
|
|
21
|
+
The raw contents of a `examples.utf` file
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
`Promise`\<[`TanakaExample`](../interfaces/TanakaExample.md)[]\>
|
|
26
|
+
|
|
27
|
+
A promise resolving with an array of converted [TanakaExample](../interfaces/TanakaExample.md) objects (with furigana)
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **generateAnkiNote**(`entry`): `string`[]
|
|
10
10
|
|
|
11
|
-
Defined in: [utils.ts:
|
|
11
|
+
Defined in: [utils.ts:2306](https://github.com/Ronokof/Henkan/blob/main/src/utils.ts#L2306)
|
|
12
12
|
|
|
13
13
|
Generates an array where each field holds an entry’s info wrapped in HTML tags.
|
|
14
14
|
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
# Function: generateAnkiNotesFile()
|
|
8
8
|
|
|
9
|
-
> **generateAnkiNotesFile**(`list`): `string`
|
|
9
|
+
> **generateAnkiNotesFile**(`list`, `defaultNoteInfo?`): `string`
|
|
10
10
|
|
|
11
|
-
Defined in: [utils.ts:
|
|
11
|
+
Defined in: [utils.ts:2654](https://github.com/Ronokof/Henkan/blob/main/src/utils.ts#L2654)
|
|
12
12
|
|
|
13
13
|
Generates an Anki notes file with each entry’s info organized into fields, either in HTML or plain text.
|
|
14
14
|
|
|
@@ -16,10 +16,16 @@ Generates an Anki notes file with each entry’s info organized into fields, eit
|
|
|
16
16
|
|
|
17
17
|
### list
|
|
18
18
|
|
|
19
|
-
[`Result`](../type-aliases/Result.md)[]
|
|
19
|
+
readonly [`Result`](../type-aliases/Result.md)[]
|
|
20
20
|
|
|
21
21
|
An array containing any type of transformed entries ([Word](../interfaces/Word.md), [Kanji](../interfaces/Kanji.md), [Radical](../interfaces/Radical.md), [Kana](../interfaces/Kana.md), [Grammar](../interfaces/Grammar.md))
|
|
22
22
|
|
|
23
|
+
### defaultNoteInfo?
|
|
24
|
+
|
|
25
|
+
[`DefaultNoteInfo`](../interfaces/DefaultNoteInfo.md)
|
|
26
|
+
|
|
27
|
+
An object with options regarding default values of some note information
|
|
28
|
+
|
|
23
29
|
## Returns
|
|
24
30
|
|
|
25
31
|
`string`
|
|
@@ -6,41 +6,35 @@
|
|
|
6
6
|
|
|
7
7
|
# Function: getKanji()
|
|
8
8
|
|
|
9
|
-
> **getKanji**(`
|
|
9
|
+
> **getKanji**(`kanji`, `dict?`, `jmDict?`, `svgList?`, `noteTypeName?`, `deckPath?`): [`Kanji`](../interfaces/Kanji.md) \| `undefined`
|
|
10
10
|
|
|
11
|
-
Defined in: [utils.ts:
|
|
11
|
+
Defined in: [utils.ts:2019](https://github.com/Ronokof/Henkan/blob/main/src/utils.ts#L2019)
|
|
12
12
|
|
|
13
13
|
Transforms a converted `KANJIDIC` entry into a more readable format
|
|
14
14
|
|
|
15
15
|
## Parameters
|
|
16
16
|
|
|
17
|
-
###
|
|
17
|
+
### kanji
|
|
18
18
|
|
|
19
|
-
[
|
|
19
|
+
The kanji character or a [DictKanji](../interfaces/DictKanji.md) object
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
### kanjiChar?
|
|
24
|
-
|
|
25
|
-
`string`
|
|
26
|
-
|
|
27
|
-
The kanji character
|
|
21
|
+
`string` | [`DictKanji`](../interfaces/DictKanji.md)
|
|
28
22
|
|
|
29
|
-
###
|
|
23
|
+
### dict?
|
|
30
24
|
|
|
31
|
-
[`DictKanji`](../interfaces/DictKanji.md)
|
|
25
|
+
readonly [`DictKanji`](../interfaces/DictKanji.md)[]
|
|
32
26
|
|
|
33
|
-
|
|
27
|
+
An array of converted `KANJIDIC` entries
|
|
34
28
|
|
|
35
29
|
### jmDict?
|
|
36
30
|
|
|
37
|
-
|
|
31
|
+
An array or a kanji-words map of converted `JMdict` entries
|
|
38
32
|
|
|
39
|
-
|
|
33
|
+
readonly [`DictWord`](../interfaces/DictWord.md)[] | `Map`\<`string`, readonly [`DictWord`](../interfaces/DictWord.md)[]\>
|
|
40
34
|
|
|
41
35
|
### svgList?
|
|
42
36
|
|
|
43
|
-
`string`[]
|
|
37
|
+
readonly `string`[]
|
|
44
38
|
|
|
45
39
|
An array of SVG file names
|
|
46
40
|
|
|
@@ -58,6 +52,6 @@ The full Anki deck path
|
|
|
58
52
|
|
|
59
53
|
## Returns
|
|
60
54
|
|
|
61
|
-
[`Kanji`](../interfaces/Kanji.md)
|
|
55
|
+
[`Kanji`](../interfaces/Kanji.md) \| `undefined`
|
|
62
56
|
|
|
63
|
-
The transformed [Kanji](../interfaces/Kanji.md) object
|
|
57
|
+
The transformed [Kanji](../interfaces/Kanji.md) object or `undefined` if entry is not found
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
# Function: getKanjiExtended()
|
|
8
8
|
|
|
9
|
-
> **getKanjiExtended**(`info`, `
|
|
9
|
+
> **getKanjiExtended**(`info`, `kanji`, `dict?`, `useWords?`, `jmDict?`, `svgList?`, `noteTypeName?`, `deckPath?`, `sourceURL?`): [`Kanji`](../interfaces/Kanji.md) \| `undefined`
|
|
10
10
|
|
|
11
|
-
Defined in: [utils.ts:
|
|
11
|
+
Defined in: [utils.ts:2187](https://github.com/Ronokof/Henkan/blob/main/src/utils.ts#L2187)
|
|
12
12
|
|
|
13
13
|
Same as [getKanji](getKanji.md), but with possible extra info.
|
|
14
14
|
|
|
@@ -20,23 +20,17 @@ Same as [getKanji](getKanji.md), but with possible extra info.
|
|
|
20
20
|
|
|
21
21
|
Additional info for the kanji (mnemonic, components, words)
|
|
22
22
|
|
|
23
|
-
###
|
|
23
|
+
### kanji
|
|
24
24
|
|
|
25
|
-
[
|
|
25
|
+
The kanji character or a [DictKanji](../interfaces/DictKanji.md) object
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
### kanjiChar?
|
|
30
|
-
|
|
31
|
-
`string`
|
|
32
|
-
|
|
33
|
-
The kanji character
|
|
27
|
+
`string` | [`DictKanji`](../interfaces/DictKanji.md)
|
|
34
28
|
|
|
35
|
-
###
|
|
29
|
+
### dict?
|
|
36
30
|
|
|
37
|
-
[`DictKanji`](../interfaces/DictKanji.md)
|
|
31
|
+
readonly [`DictKanji`](../interfaces/DictKanji.md)[]
|
|
38
32
|
|
|
39
|
-
|
|
33
|
+
An array of converted `KANJIDIC` entries
|
|
40
34
|
|
|
41
35
|
### useWords?
|
|
42
36
|
|
|
@@ -46,13 +40,13 @@ Whether or not to use the words provided in the `info` object (if present) inste
|
|
|
46
40
|
|
|
47
41
|
### jmDict?
|
|
48
42
|
|
|
49
|
-
|
|
43
|
+
An array or a kanji-words map of converted `JMdict` entries
|
|
50
44
|
|
|
51
|
-
|
|
45
|
+
readonly [`DictWord`](../interfaces/DictWord.md)[] | `Map`\<`string`, readonly [`DictWord`](../interfaces/DictWord.md)[]\>
|
|
52
46
|
|
|
53
47
|
### svgList?
|
|
54
48
|
|
|
55
|
-
`string`[]
|
|
49
|
+
readonly `string`[]
|
|
56
50
|
|
|
57
51
|
An array of SVG file names
|
|
58
52
|
|
|
@@ -68,8 +62,14 @@ The Anki note type name
|
|
|
68
62
|
|
|
69
63
|
The full Anki deck path
|
|
70
64
|
|
|
65
|
+
### sourceURL?
|
|
66
|
+
|
|
67
|
+
`string`
|
|
68
|
+
|
|
69
|
+
A link leading to the source of [info](#getkanjiextended)
|
|
70
|
+
|
|
71
71
|
## Returns
|
|
72
72
|
|
|
73
|
-
[`Kanji`](../interfaces/Kanji.md)
|
|
73
|
+
[`Kanji`](../interfaces/Kanji.md) \| `undefined`
|
|
74
74
|
|
|
75
75
|
The transformed [Kanji](../interfaces/Kanji.md) object
|
|
@@ -6,49 +6,43 @@
|
|
|
6
6
|
|
|
7
7
|
# Function: getWord()
|
|
8
8
|
|
|
9
|
-
> **getWord**(`
|
|
9
|
+
> **getWord**(`word`, `dict?`, `kanjiDic?`, `examples?`, `definitions?`, `noteTypeName?`, `deckPath?`): [`Word`](../interfaces/Word.md) \| `undefined`
|
|
10
10
|
|
|
11
|
-
Defined in: [utils.ts:
|
|
11
|
+
Defined in: [utils.ts:1611](https://github.com/Ronokof/Henkan/blob/main/src/utils.ts#L1611)
|
|
12
12
|
|
|
13
|
-
Transforms a converted `JMdict` entry into a more readable format, by providing either its
|
|
13
|
+
Transforms a converted `JMdict` entry into a more readable format, by providing either its JMdict entry ID or the [DictWord](../interfaces/DictWord.md) object directly.
|
|
14
14
|
|
|
15
15
|
## Parameters
|
|
16
16
|
|
|
17
|
-
###
|
|
17
|
+
### word
|
|
18
18
|
|
|
19
|
-
[
|
|
19
|
+
The ID of the `JMdict` entry or a [DictWord](../interfaces/DictWord.md) object
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
`` `${number}` `` | [`DictWord`](../interfaces/DictWord.md)
|
|
22
22
|
|
|
23
|
-
###
|
|
23
|
+
### dict?
|
|
24
24
|
|
|
25
|
-
`
|
|
25
|
+
readonly [`DictWord`](../interfaces/DictWord.md)[]
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
An array of converted `JMdict` entries
|
|
28
28
|
|
|
29
29
|
### kanjiDic?
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
An array or an ID-kanji map of converted `KANJIDIC` entries
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
readonly [`DictKanji`](../interfaces/DictKanji.md)[] | `Map`\<`string`, readonly [`DictKanji`](../interfaces/DictKanji.md)[]\>
|
|
34
34
|
|
|
35
35
|
### examples?
|
|
36
36
|
|
|
37
|
-
[`TanakaExample`](../interfaces/TanakaExample.md)[]
|
|
38
|
-
|
|
39
37
|
An array of converted `Tanaka Corpus` examples
|
|
40
38
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
An array of `ja.wiktionary.org` word definitions
|
|
39
|
+
readonly [`TanakaExample`](../interfaces/TanakaExample.md)[] | `Map`\<`string`, readonly [`TanakaExample`](../interfaces/TanakaExample.md)[]\>
|
|
44
40
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
### dictWord?
|
|
41
|
+
### definitions?
|
|
48
42
|
|
|
49
|
-
|
|
43
|
+
An array or ID-definitions map of `ja.wiktionary.org` word definitions
|
|
50
44
|
|
|
51
|
-
|
|
45
|
+
`Map`\<`string`, readonly [`Definition`](../interfaces/Definition.md)[]\> | readonly [`WordDefinitionPair`](../interfaces/WordDefinitionPair.md)[]
|
|
52
46
|
|
|
53
47
|
### noteTypeName?
|
|
54
48
|
|
|
@@ -64,6 +58,6 @@ The full Anki deck path
|
|
|
64
58
|
|
|
65
59
|
## Returns
|
|
66
60
|
|
|
67
|
-
[`Word`](../interfaces/Word.md)
|
|
61
|
+
[`Word`](../interfaces/Word.md) \| `undefined`
|
|
68
62
|
|
|
69
|
-
The transformed [Word](../interfaces/Word.md) object
|
|
63
|
+
The transformed [Word](../interfaces/Word.md) object or `undefined` if entry is not found
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
# Function: getWordDefinitions()
|
|
8
8
|
|
|
9
|
-
> **getWordDefinitions**(`entryList`, `jmDict
|
|
9
|
+
> **getWordDefinitions**(`entryList`, `jmDict`): [`WordDefinitionPair`](../interfaces/WordDefinitionPair.md)[]
|
|
10
10
|
|
|
11
|
-
Defined in: [utils.ts:
|
|
11
|
+
Defined in: [utils.ts:869](https://github.com/Ronokof/Henkan/blob/main/src/utils.ts#L869)
|
|
12
12
|
|
|
13
13
|
Pairs Japanese definitions with JMdict word entries
|
|
14
14
|
|
|
@@ -16,24 +16,18 @@ Pairs Japanese definitions with JMdict word entries
|
|
|
16
16
|
|
|
17
17
|
### entryList
|
|
18
18
|
|
|
19
|
-
`
|
|
19
|
+
readonly [`JaWiktionaryEntry`](../interfaces/JaWiktionaryEntry.md)[]
|
|
20
20
|
|
|
21
|
-
An array containing `ja.wiktionary.org` Japanese entries (converted using [
|
|
21
|
+
An array containing `ja.wiktionary.org` Japanese entries (converted using [convertJawiktionarySync](convertJawiktionarySync.md) or [convertJawiktionaryAsync](convertJawiktionaryAsync.md))
|
|
22
22
|
|
|
23
23
|
### jmDict
|
|
24
24
|
|
|
25
|
-
[`DictWord`](../interfaces/DictWord.md)[]
|
|
25
|
+
readonly [`DictWord`](../interfaces/DictWord.md)[]
|
|
26
26
|
|
|
27
27
|
An array of converted `JMdict` entries
|
|
28
28
|
|
|
29
|
-
### generateFurigana?
|
|
30
|
-
|
|
31
|
-
`true`
|
|
32
|
-
|
|
33
|
-
Whether or not to generate furigana for the definitions
|
|
34
|
-
|
|
35
29
|
## Returns
|
|
36
30
|
|
|
37
|
-
|
|
31
|
+
[`WordDefinitionPair`](../interfaces/WordDefinitionPair.md)[]
|
|
38
32
|
|
|
39
33
|
A promise resolving with an array of [WordDefinitionPair](../interfaces/WordDefinitionPair.md) objects
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
[**henkan**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[henkan](../README.md) / getWordDefinitionsWithFurigana
|
|
6
|
+
|
|
7
|
+
# Function: getWordDefinitionsWithFurigana()
|
|
8
|
+
|
|
9
|
+
> **getWordDefinitionsWithFurigana**(`entryList`, `jmDict`): `Promise`\<[`WordDefinitionPair`](../interfaces/WordDefinitionPair.md)[]\>
|
|
10
|
+
|
|
11
|
+
Defined in: [utils.ts:1533](https://github.com/Ronokof/Henkan/blob/main/src/utils.ts#L1533)
|
|
12
|
+
|
|
13
|
+
Pairs Japanese definitions with JMdict word entries (with furigana)
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### entryList
|
|
18
|
+
|
|
19
|
+
readonly [`JaWiktionaryEntry`](../interfaces/JaWiktionaryEntry.md)[]
|
|
20
|
+
|
|
21
|
+
An array containing `ja.wiktionary.org` Japanese entries (converted using [convertJawiktionarySync](convertJawiktionarySync.md) or [convertJawiktionaryAsync](convertJawiktionaryAsync.md))
|
|
22
|
+
|
|
23
|
+
### jmDict
|
|
24
|
+
|
|
25
|
+
readonly [`DictWord`](../interfaces/DictWord.md)[]
|
|
26
|
+
|
|
27
|
+
An array of converted `JMdict` entries
|
|
28
|
+
|
|
29
|
+
## Returns
|
|
30
|
+
|
|
31
|
+
`Promise`\<[`WordDefinitionPair`](../interfaces/WordDefinitionPair.md)[]\>
|
|
32
|
+
|
|
33
|
+
A promise resolving with an array of [WordDefinitionPair](../interfaces/WordDefinitionPair.md) objects (with furigana)
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **isStringArray**(`arg`): `arg is string[]`
|
|
10
10
|
|
|
11
|
-
Defined in: [utils.ts:
|
|
11
|
+
Defined in: [utils.ts:87](https://github.com/Ronokof/Henkan/blob/main/src/utils.ts#L87)
|
|
12
12
|
|
|
13
13
|
Checks if the argument is an array of strings.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **isValidArray**(`arg`): `arg is any[]`
|
|
10
10
|
|
|
11
|
-
Defined in: [utils.ts:
|
|
11
|
+
Defined in: [utils.ts:63](https://github.com/Ronokof/Henkan/blob/main/src/utils.ts#L63)
|
|
12
12
|
|
|
13
13
|
Checks if the argument is an array.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **isValidArrayWithFirstElement**(`arg`): `arg is any[]`
|
|
10
10
|
|
|
11
|
-
Defined in: [utils.ts:
|
|
11
|
+
Defined in: [utils.ts:72](https://github.com/Ronokof/Henkan/blob/main/src/utils.ts#L72)
|
|
12
12
|
|
|
13
13
|
Checks if the argument is an array and has at least one element.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **shuffleArray**\<`T`\>(`arr`): `T`[]
|
|
10
10
|
|
|
11
|
-
Defined in: [utils.ts:
|
|
11
|
+
Defined in: [utils.ts:101](https://github.com/Ronokof/Henkan/blob/main/src/utils.ts#L101)
|
|
12
12
|
|
|
13
13
|
Shuffles an array using the `Fisher–Yates shuffle` algorithm
|
|
14
14
|
|
|
@@ -22,7 +22,7 @@ Shuffles an array using the `Fisher–Yates shuffle` algorithm
|
|
|
22
22
|
|
|
23
23
|
### arr
|
|
24
24
|
|
|
25
|
-
`T`[]
|
|
25
|
+
readonly `T`[]
|
|
26
26
|
|
|
27
27
|
The array to be shuffled
|
|
28
28
|
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
[**henkan**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[henkan](../README.md) / DefaultNoteInfo
|
|
6
|
+
|
|
7
|
+
# Interface: DefaultNoteInfo
|
|
8
|
+
|
|
9
|
+
Defined in: [types.ts:883](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L883)
|
|
10
|
+
|
|
11
|
+
Default note ID, note type and deck name of a note
|
|
12
|
+
|
|
13
|
+
Setting any of the properties to:
|
|
14
|
+
|
|
15
|
+
- a `string` will make that string the default note ID/note type/deck name of the note in case [Result.noteID](Grammar.md#noteid)/[Result.noteTypeName](Grammar.md#notetypename)/[Result.deckPath](Grammar.md#deckpath) is `undefined`.
|
|
16
|
+
|
|
17
|
+
- `true` will require all [Result](../type-aliases/Result.md) objects to have [Result.noteID](Grammar.md#noteid)/[Result.noteTypeName](Grammar.md#notetypename)/[Result.deckPath](Grammar.md#deckpath) set (*no default values*).
|
|
18
|
+
|
|
19
|
+
- `undefined` (*or not set*) will require all [Result](../type-aliases/Result.md) objects to either have [Result.noteID](Grammar.md#noteid)/[Result.noteTypeName](Grammar.md#notetypename)/[Result.deckPath](Grammar.md#deckpath) set or not set (*no default values*).
|
|
20
|
+
|
|
21
|
+
## Properties
|
|
22
|
+
|
|
23
|
+
### deckPath?
|
|
24
|
+
|
|
25
|
+
> `optional` **deckPath**: `string` \| `true`
|
|
26
|
+
|
|
27
|
+
Defined in: [types.ts:897](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L897)
|
|
28
|
+
|
|
29
|
+
A default for [Result.deckPath](Grammar.md#deckpath)
|
|
30
|
+
|
|
31
|
+
***
|
|
32
|
+
|
|
33
|
+
### guid?
|
|
34
|
+
|
|
35
|
+
> `optional` **guid**: `true` \| `"main_information"`
|
|
36
|
+
|
|
37
|
+
Defined in: [types.ts:889](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L889)
|
|
38
|
+
|
|
39
|
+
A default for [Result.noteID](Grammar.md#noteid)
|
|
40
|
+
|
|
41
|
+
`main_information` will make either the ID or kana/kanji/radical character the default note ID of the note.
|
|
42
|
+
|
|
43
|
+
***
|
|
44
|
+
|
|
45
|
+
### noteType?
|
|
46
|
+
|
|
47
|
+
> `optional` **noteType**: `string` \| `true`
|
|
48
|
+
|
|
49
|
+
Defined in: [types.ts:893](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L893)
|
|
50
|
+
|
|
51
|
+
A default for [Result.noteTypeName](Grammar.md#notetypename)
|
|
@@ -52,9 +52,9 @@ The [pre-2010 JLPT](https://en.wikipedia.org/wiki/Japanese-Language_Proficiency_
|
|
|
52
52
|
|
|
53
53
|
***
|
|
54
54
|
|
|
55
|
-
### strokeNumber
|
|
55
|
+
### strokeNumber?
|
|
56
56
|
|
|
57
|
-
> `
|
|
57
|
+
> `optional` **strokeNumber**: `string`
|
|
58
58
|
|
|
59
59
|
Defined in: [types.ts:216](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L216)
|
|
60
60
|
|
|
@@ -14,9 +14,9 @@ Equivalent to the `reading_meaning` KANJIDIC2 element
|
|
|
14
14
|
|
|
15
15
|
## Properties
|
|
16
16
|
|
|
17
|
-
### groups
|
|
17
|
+
### groups?
|
|
18
18
|
|
|
19
|
-
> **groups**: [`DictKanjiReadingMeaningGroup`](DictKanjiReadingMeaningGroup.md)[]
|
|
19
|
+
> `optional` **groups**: [`DictKanjiReadingMeaningGroup`](DictKanjiReadingMeaningGroup.md)[]
|
|
20
20
|
|
|
21
21
|
Defined in: [types.ts:278](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L278)
|
|
22
22
|
|
|
@@ -14,9 +14,9 @@ Equivalent to the `rmgroup` KANJIDIC2 element
|
|
|
14
14
|
|
|
15
15
|
## Properties
|
|
16
16
|
|
|
17
|
-
### meanings
|
|
17
|
+
### meanings?
|
|
18
18
|
|
|
19
|
-
> **meanings**: `string`[]
|
|
19
|
+
> `optional` **meanings**: `string`[]
|
|
20
20
|
|
|
21
21
|
Defined in: [types.ts:266](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L266)
|
|
22
22
|
|
|
@@ -24,9 +24,9 @@ The kanji meanings
|
|
|
24
24
|
|
|
25
25
|
***
|
|
26
26
|
|
|
27
|
-
### readings
|
|
27
|
+
### readings?
|
|
28
28
|
|
|
29
|
-
> **readings**: [`DictKanjiReading`](DictKanjiReading.md)[]
|
|
29
|
+
> `optional` **readings**: [`DictKanjiReading`](DictKanjiReading.md)[]
|
|
30
30
|
|
|
31
31
|
Defined in: [types.ts:262](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L262)
|
|
32
32
|
|
|
@@ -24,10 +24,10 @@ The kanji character
|
|
|
24
24
|
|
|
25
25
|
### radicals
|
|
26
26
|
|
|
27
|
-
> **radicals**:
|
|
27
|
+
> **radicals**: [`DictKanji`](DictKanji.md)[]
|
|
28
28
|
|
|
29
29
|
Defined in: [types.ts:340](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L340)
|
|
30
30
|
|
|
31
31
|
The radicals/components that make up the kanji
|
|
32
32
|
|
|
33
|
-
Can be [DictKanji](DictKanji.md) objects
|
|
33
|
+
Can be [DictKanji](DictKanji.md) objects with either an actual kanji or a katakana character (which takes the place of the missing kanji)
|
|
@@ -28,7 +28,7 @@ Whether or not the entry has at least one Tanaka Corpus phrase associated with i
|
|
|
28
28
|
|
|
29
29
|
### id
|
|
30
30
|
|
|
31
|
-
> `readonly` **id**: `
|
|
31
|
+
> `readonly` **id**: `` `${number}` ``
|
|
32
32
|
|
|
33
33
|
Defined in: [types.ts:176](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L176)
|
|
34
34
|
|
|
@@ -56,7 +56,7 @@ Whether or not this entry should be converted into an Anki note
|
|
|
56
56
|
|
|
57
57
|
### id?
|
|
58
58
|
|
|
59
|
-
> `
|
|
59
|
+
> `optional` **id**: `` `${number}` ``
|
|
60
60
|
|
|
61
61
|
Defined in: [types.ts:507](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L507)
|
|
62
62
|
|
|
@@ -90,7 +90,7 @@ The English meaning/translation of the grammar point
|
|
|
90
90
|
|
|
91
91
|
### noteID?
|
|
92
92
|
|
|
93
|
-
> `
|
|
93
|
+
> `optional` **noteID**: `string`
|
|
94
94
|
|
|
95
95
|
Defined in: [types.ts:503](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L503)
|
|
96
96
|
|
|
@@ -56,7 +56,7 @@ Whether or not this entry should be converted into an Anki note
|
|
|
56
56
|
|
|
57
57
|
### id?
|
|
58
58
|
|
|
59
|
-
> `
|
|
59
|
+
> `optional` **id**: `` `${number}` ``
|
|
60
60
|
|
|
61
61
|
Defined in: [types.ts:507](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L507)
|
|
62
62
|
|
|
@@ -80,7 +80,7 @@ The kana character
|
|
|
80
80
|
|
|
81
81
|
### noteID?
|
|
82
82
|
|
|
83
|
-
> `
|
|
83
|
+
> `optional` **noteID**: `string`
|
|
84
84
|
|
|
85
85
|
Defined in: [types.ts:503](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L503)
|
|
86
86
|
|
|
@@ -56,25 +56,25 @@ Whether or not this entry should be converted into an Anki note
|
|
|
56
56
|
|
|
57
57
|
***
|
|
58
58
|
|
|
59
|
-
###
|
|
60
|
-
|
|
61
|
-
> `optional` **frequency**: `string`
|
|
59
|
+
### externalInfo?
|
|
62
60
|
|
|
63
|
-
|
|
61
|
+
> `optional` **externalInfo**: `true`
|
|
64
62
|
|
|
65
|
-
|
|
63
|
+
Defined in: [types.ts:683](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L683)
|
|
66
64
|
|
|
67
|
-
[
|
|
65
|
+
Whether or not this kanji object contains information extracted from [source](#source)
|
|
68
66
|
|
|
69
67
|
***
|
|
70
68
|
|
|
71
|
-
###
|
|
69
|
+
### frequency?
|
|
72
70
|
|
|
73
|
-
> `optional` **
|
|
71
|
+
> `optional` **frequency**: `string`
|
|
74
72
|
|
|
75
|
-
Defined in: [types.ts:
|
|
73
|
+
Defined in: [types.ts:667](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L667)
|
|
76
74
|
|
|
77
|
-
|
|
75
|
+
#### See
|
|
76
|
+
|
|
77
|
+
[DictKanjiMisc.frequency](DictKanjiMisc.md#frequency)
|
|
78
78
|
|
|
79
79
|
***
|
|
80
80
|
|
|
@@ -92,7 +92,7 @@ Defined in: [types.ts:663](https://github.com/Ronokof/Henkan/blob/main/src/types
|
|
|
92
92
|
|
|
93
93
|
### id?
|
|
94
94
|
|
|
95
|
-
> `
|
|
95
|
+
> `optional` **id**: `` `${number}` ``
|
|
96
96
|
|
|
97
97
|
Defined in: [types.ts:507](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L507)
|
|
98
98
|
|
|
@@ -184,7 +184,7 @@ Defined in: [types.ts:643](https://github.com/Ronokof/Henkan/blob/main/src/types
|
|
|
184
184
|
|
|
185
185
|
### noteID?
|
|
186
186
|
|
|
187
|
-
> `
|
|
187
|
+
> `optional` **noteID**: `string`
|
|
188
188
|
|
|
189
189
|
Defined in: [types.ts:503](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L503)
|
|
190
190
|
|
|
@@ -12,9 +12,9 @@ A pair of a "kanji form"/"reading"/"sense" note and its associated tag
|
|
|
12
12
|
|
|
13
13
|
## Properties
|
|
14
14
|
|
|
15
|
-
### note
|
|
15
|
+
### note
|
|
16
16
|
|
|
17
|
-
> `readonly`
|
|
17
|
+
> `readonly` **note**: `string`
|
|
18
18
|
|
|
19
19
|
Defined in: [types.ts:533](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L533)
|
|
20
20
|
|