MCPcopy Index your code
hub / github.com/Leko/goya

github.com/Leko/goya @v0.1.9

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.9 ↗ · + Follow
118 symbols 254 edges 30 files 0 documented · 0% updated 4y ago★ 843 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Goya

goya at crates.io goya at docs.rs

Japanese Morphological Analyzer written in Rust.
Goya's main goal is to compile to WebAssembly for morphological analysis in browsers and other JavaScript runtimes. In addition, it can be used with the CLI and Rust.

Try Goya playground. It uses the Goya-wasm from WebWorker.

Getting started

Fetch the latest IPA dictionary

Download the latest IPA dictionary from the official Mecab website and unzip it.

Install Goya CLI

cargo install goya-cli

Compile the IPA dictionary

Generates a binary dictionary for morphological analysis. It may take a minute or two.

goya compile /path/to/ipadic

Binary dictionaries are generated in the ~/.goya directory by default. You can also change the output destination with the --dicdir option.

goya --dicdir=/path/to/generated compile /path/to/ipadic

Run Morphological Analysis

$ echo すもももももももものうち | goya
すもも 名詞,一般,*,*,*,*,すもも,スモモ,スモモ
も   助詞,係助詞,*,*,*,*,も,モ,モ
もも  名詞,一般,*,*,*,*,もも,モモ,モモ
も   助詞,係助詞,*,*,*,*,も,モ,モ
もも  名詞,一般,*,*,*,*,もも,モモ,モモ
の   助詞,連体化,*,*,*,*,の,ノ,ノ
うち  名詞,非自立,副詞可能,*,*,*,うち,ウチ,ウチ
EOS

If you specified the --dicdir option when compiling the dictionary, you should also specify it when running the goya command.

echo すもももももももものうち | goya --dicdir=/path/to/generated

Release

cargo release <patch|minor|major> --workspace --no-tag --skip-publish --dependent-version Upgrade
git tag v{{VERSION}}
git push origin v{{VERSION}}

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 60
Function 29
Class 19
Enum 7
Interface 3

Languages

Rust92%
TypeScript8%

Modules by API surface

goya/src/double_array.rs17 symbols
goya/src/char_class.rs13 symbols
ipadic/src/ipadic.rs11 symbols
ipadic/src/ipadic_loader.rs10 symbols
goya/src/common_prefix_tree.rs9 symbols
wasm-core/src/lib.rs8 symbols
goya/src/word_features.rs7 symbols
goya/src/lattice.rs6 symbols
goya-cli/src/path_util.rs6 symbols
goya/src/id.rs4 symbols
goya-cli/src/repl.rs4 symbols
goya-cli/src/main.rs4 symbols

For agents

$ claude mcp add goya \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page