Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/goyaPublic

Japanese Morphological Analysis written in Rust

License

NotificationsYou must be signed in to change notification settings

Leko/goya

Repository files navigation

goya at crates.iogoya at docs.rs

Goya is a Japanese Morphological Analyzer written in Rust.
The 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 fromthe official Mecab website and unzip it.

Install Goya CLI

cargo install goya-cli

Compile the IPA dictionary

Compile the IPA dictionary to generate a binary dictionary for morphological analysis. It may take a few minutes.

goya compile /path/to/ipadic

The binary dictionary will be generated in the~/.goya directory by default. You can change the destination with the--dicdir option.

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

Run Morphological Analysis

Goya takes input from STDIN. The easiest way is using the echo command and pipe it to the Goya.

$ 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 Upgradegit tag v{{VERSION}}git push origin v{{VERSION}}

About

Japanese Morphological Analysis written in Rust

Topics

Resources

License

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp