| 項目 | micado | MeCab | ChaSen | JUMAN | KAKASI |
|---|---|---|---|---|---|
| 解析モデル | bi-gram マルコフモデル | bi-gram マルコフモデル | 可変長マルコフモデル | bi-gram マルコフモデル | 最長一致 |
| コスト推定 | MeCab辞書から取得 | コーパスから学習 | コーパスから学習 | 人手 | コストという概念なし |
| 学習モデル | -(辞書依存) | CRF(識別モデル) | HMM(生成モデル) | - | - |
| 辞書引きアルゴリズム | Double Array | Double Array | Double Array | パトリシア木 | Hash? |
| 解探索アルゴリズム | Viterbi | Viterbi | Viterbi | Viterbi | 決定的? |
| 連接表の実装 | 2次元 Table(圧縮ID) | 2次元 Table | オートマトン | 2次元 Table? | 連接表なし? |
| 品詞の階層 | 簡易列挙型 + mecab_feature | 無制限多階層品詞 | 無制限多階層品詞 | 2段階固定 | 品詞という概念なし? |
| 未知語処理 | 字種(複数候補生成) | 字種(動作定義を変更可能) | 字種(変更不可能) | 字種(変更不可能) | - |
| 制約つき解析 | 可能 | 可能 | 2.4.0 で可能 | 不可能 | 不可能 |
| N-best 解 | 可能 | 可能 | 不可能 | 不可能 | 不可能 |
.
├── src/
│ ├── scanner/utf16, scanner/utf8
│ ├── core/da_trie, lattice, scorer, unknown, viterbi
│ ├── cli/mecab (MeCab互換CLIロジック)
│ ├── tokenizer
│ └── types
├── cmd/
│ ├── main (MeCab dicdir を使う CLI)
│ ├── tokenize (stdin を内部 tokenizer で処理する CLI)
│ ├── ipadic_demo (standard edition demo)
│ ├── neologd_demo (full edition demo)
│ ├── wasm_api (wasm 線形 ABI)
│ └── bench
├── tools/
│ ├── dict-compiler
│ ├── distribution
│ └── benchmark
├── bench/corpus
├── bench/lexmatch_vs_manual, bench/throughput
└── npm/micado-wasmmoon info
moon fmt
moon test
moon checktools/distribution/verify_cli_wasm.shmoon run cmd/ipadic_demomoon run cmd/neologd_demomoon run --target native cmd/main -- -d /path/to/mecab/dic -O mecab "吾輩は猫である。"
moon run --target native cmd/main -- -d /path/to/mecab/dic -O json "太郎は走った。"cat bench/corpus/aozora_openings.txt | moon run --target native cmd/tokenize --
cat bench/corpus/aozora_openings.txt | moon run --target native cmd/tokenize -- -O wakatiprintf '太郎は走る\n' | moon run --target native cmd/tokenize --
printf '太郎は走る\n' | moon run --target native cmd/tokenize -- -O wakati
printf '龘龘龘\n' | moon run --target native cmd/tokenize -- --output-format-type=wakati --nbest=3 --must-break 1
printf '龘龘\n' | moon run --target native cmd/tokenize -- -O wakati --must-cover-span 0:2
printf '迅速\n' | moon run --target native cmd/tokenize -- -O count --allow-pos noun-generaltools/benchmark/run_all.sh --dicdir /opt/homebrew/lib/mecab/dic/ipadicbench/benchmark/quick_compare_latest.txt
bench/benchmark/quick_compare_latest.svg
bench/benchmark/quick_compare_latest.png[micado/full]
Warmup: 0.048463
Warmup_startup_overhead_estimate: 0.007016
Warmup_without_startup_estimate: 0.041447
Number_of_sentences: 20000
Elapsed_seconds_to_tokenize_all_sentences: [0.043505,0.044134,0.045193]
Sentences_per_second: [442546.41,453165.36,459717.27]
Startup_overhead_seconds_estimate: [0.005730,0.006015,0.006438]
Elapsed_seconds_without_startup_estimate: [0.037775,0.038119,0.038755]
Sentences_per_second_without_startup_estimate: [516062.44,524672.74,529450.69]
[mecab/ipadic]
Warmup: 0.176983
Warmup_startup_overhead_estimate: 0.006401
Warmup_without_startup_estimate: 0.170582
Number_of_sentences: 20000
Elapsed_seconds_to_tokenize_all_sentences: [0.173306,0.175538,0.179938]
Sentences_per_second: [111149.40,113935.44,115402.81]
Startup_overhead_seconds_estimate: [0.006118,0.006372,0.006757]
Elapsed_seconds_without_startup_estimate: [0.167188,0.169166,0.173181]
Sentences_per_second_without_startup_estimate: [115486.11,118227.07,119625.81]
[vibrato/ipadic-mecab-2_7_0]
Warmup: 0.216959
Warmup_startup_overhead_estimate: 0.135492
Warmup_without_startup_estimate: 0.081466
Number_of_sentences: 20000
Elapsed_seconds_to_tokenize_all_sentences: [0.166726,0.170203,0.176622]
Sentences_per_second: [113236.03,117506.98,119957.00]
Startup_overhead_seconds_estimate: [0.130243,0.132174,0.134707]
Elapsed_seconds_without_startup_estimate: [0.036484,0.038028,0.041916]
Sentences_per_second_without_startup_estimate: [477149.70,525922.69,548189.76]tools/distribution/package_release_assets.shtools/distribution/build_wasm_npm.shnpm run build:wasmfn tokenize_nbest_with_options(input : String, n : Int, options : ParseOptions) -> Array[NBestResult]fn tokenize_utf8_nbest_with_options(input : BytesView, n : Int, options : ParseOptions) -> Array[NBestResult]