Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shogo82148/go-mecab
MeCab binding for Golang
https://github.com/shogo82148/go-mecab
golang mecab
Last synced: 16 days ago
JSON representation
MeCab binding for Golang
- Host: GitHub
- URL: https://github.com/shogo82148/go-mecab
- Owner: shogo82148
- License: mit
- Created: 2016-02-10T11:51:29.000Z (almost 9 years ago)
- Default Branch: main
- Last Pushed: 2024-04-02T02:39:04.000Z (8 months ago)
- Last Synced: 2024-10-14T20:49:12.246Z (about 1 month ago)
- Topics: golang, mecab
- Language: Go
- Size: 127 KB
- Stars: 42
- Watchers: 4
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-mecab
![test](https://github.com/shogo82148/go-mecab/workflows/test/badge.svg)
[![PkgGoDev](https://pkg.go.dev/badge/github.com/shogo82148/go-mecab)](https://pkg.go.dev/github.com/shogo82148/go-mecab)go-mecab is [MeCab](http://taku910.github.io/mecab/) binding for Golang.
## SYNOPSIS
``` 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: こんにちは 世界
```## INSTALL
You need to tell Go where MeCab has been installed.
``` bash
$ export CGO_LDFLAGS="-L/path/to/lib -lmecab -lstdc++"
$ export CGO_CFLAGS="-I/path/to/include"
$ go get github.com/shogo82148/go-mecab
```If you installed `mecab-config`, execute following comands.
``` bash
$ export CGO_LDFLAGS="`mecab-config --libs`"
$ export CGO_CFLAGS="-I`mecab-config --inc-dir`"
$ go get github.com/shogo82148/go-mecab
```## SEE ALSO
- [godoc on pkg.go.dev](https://pkg.go.dev/github.com/shogo82148/go-mecab)
- [MeCab](http://taku910.github.io/mecab/)
- [MeCab repository](https://github.com/taku910/mecab)
- [Unofficial fork of taku910/mecab](https://shogo82148.github.io/mecab)
- [Unofficial fork of taku910/mecab repository](https://github.com/shogo82148/mecab)