### Install go-mecab using mecab-config Source: https://github.com/shogo82148/go-mecab/blob/main/README.md Shows how to install go-mecab using `mecab-config` to automatically determine MeCab installation paths for CGO linker and compiler flags. ```bash $ export CGO_LDFLAGS="`mecab-config --libs`" $ export CGO_CFLAGS="-I`mecab-config --inc-dir`" $ go get github.com/shogo82148/go-mecab ``` -------------------------------- ### Install go-mecab with custom MeCab path Source: https://github.com/shogo82148/go-mecab/blob/main/README.md Provides instructions for installing the go-mecab library by setting environment variables for CGO linker and compiler flags to specify the MeCab installation path. ```bash $ export CGO_LDFLAGS="-L/path/to/lib -lmecab -lstdc++" $ export CGO_CFLAGS="-I/path/to/include" $ go get github.com/shogo82148/go-mecab ``` -------------------------------- ### Parse Japanese text with go-mecab Source: https://github.com/shogo82148/go-mecab/blob/main/README.md Demonstrates how to initialize a MeCab tagger with a specific output format and parse Japanese text. It shows error handling and resource cleanup. ```go import "github.com/shogo82148/go-mecab" tagger, err := mecab.New(map[string]string{"output-format-type": "wakati"}) defer tagger.Destroy() result, err := tagger.Parse("こんにちは世界") fmt.Println(result) // Output: こんにちは 世界 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.