feat: source frequency ranks from installed Yomitan dictionaries

This commit is contained in:
2026-02-28 03:47:57 -08:00
parent d24283e82d
commit a9f7ea0204
21 changed files with 448 additions and 55 deletions

View File

@@ -33,7 +33,7 @@ interface CliOptions {
function parseCliArgs(argv: string[]): CliOptions {
const args = [...argv];
let inputParts: string[] = [];
let dictionaryPath = path.join(process.cwd(), 'vendor', 'jiten_freq_global');
let dictionaryPath = path.join(process.cwd(), 'vendor', 'frequency-dictionary');
let emitPretty = false;
let emitDiagnostics = false;
let mecabCommand: string | undefined;
@@ -394,7 +394,7 @@ function printUsage(): void {
--color-band-5 <#hex> Frequency band-5 color.
--color-known <#hex> Known-word color (default: #a6da95).
--color-n-plus-one <#hex> N+1 target color (default: #c6a0f6).
--dictionary <path> Frequency dictionary root path (default: ./vendor/jiten_freq_global)
--dictionary <path> Frequency dictionary root path (default: ./vendor/frequency-dictionary)
--mecab-command <path> Optional MeCab binary path (default: mecab)
--mecab-dictionary <path> Optional MeCab dictionary directory (default: system default)
-h, --help Show usage.