henkan 1.1.2 → 2.0.1
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 +3 -3
- 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 +51 -42
- 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
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ pnpm add henkan
|
|
|
37
37
|
- User-friendly schemas for dictionary entries
|
|
38
38
|
- Anki note generation
|
|
39
39
|
- "Japanese definition"-"JMdict entry" pairing (using `ja.wiktionary.org` dumps)
|
|
40
|
-
- Other useful tools (
|
|
40
|
+
- Other useful tools (Japanese RegExps, array checking etc.)
|
|
41
41
|
|
|
42
42
|
---
|
|
43
43
|
|
|
@@ -56,14 +56,14 @@ const dictContent = fs.readFileSync(dictPath, 'utf-8');
|
|
|
56
56
|
|
|
57
57
|
const dictWords = convertJMdict(dictContent);
|
|
58
58
|
|
|
59
|
-
const jmDict = undefined,
|
|
59
|
+
const jmDict = undefined, kanjiDic = undefined, tanakaCorpus = undefined, definitions = undefined;
|
|
60
60
|
|
|
61
61
|
const noteTypeName = 'Word';
|
|
62
62
|
const deckName = 'Japanese::Vocabulary::No kanji form words';
|
|
63
63
|
|
|
64
64
|
const noKanjiFormWords = dictWords
|
|
65
65
|
.filter(word => word.kanjiForms === undefined)
|
|
66
|
-
.map(word => getWord(
|
|
66
|
+
.map(word => getWord(word, jmDict, kanjiDic, tanakaCorpus, definitions, noteTypeName, deckName));
|
|
67
67
|
|
|
68
68
|
const ankiNotesFile = generateAnkiNotesFile(noKanjiFormWords);
|
|
69
69
|
|