Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dveselov/mystem
CGo bindings to Yandex.Mystem
https://github.com/dveselov/mystem
cgo-bindings linguistics mystem russian-specific
Last synced: about 2 months ago
JSON representation
CGo bindings to Yandex.Mystem
- Host: GitHub
- URL: https://github.com/dveselov/mystem
- Owner: dveselov
- License: mit
- Created: 2016-08-30T14:55:39.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-10-05T05:53:17.000Z (about 8 years ago)
- Last Synced: 2024-07-31T20:52:34.894Z (4 months ago)
- Topics: cgo-bindings, linguistics, mystem, russian-specific
- Language: Go
- Homepage:
- Size: 13.7 KB
- Stars: 32
- Watchers: 4
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go - go-mystem - CGo bindings to Yandex.Mystem - russian morphology analyzer. (Natural Language Processing / Translation)
- zero-alloc-awesome-go - go-mystem - CGo bindings to Yandex.Mystem - russian morphology analyzer. (Natural Language Processing / Translation)
- awesome-go - mystem - CGo bindings to Yandex.Mystem - ★ 19 (Natural Language Processing)
- awesome-go-extra - mystem - 08-30T14:55:39Z|2016-10-05T05:53:17Z| (Bot Building / Translation)
- awesome-go-zh - go-mystem - 俄罗斯形态分析仪. (自然语言处理 / 交流)
README
# go-mystem [![Build Status](https://travis-ci.org/dveselov/mystem.svg?branch=master)](https://travis-ci.org/dveselov/mystem) [![GoDoc](https://godoc.org/github.com/dveselov/mystem?status.svg)](https://godoc.org/github.com/dveselov/mystem) [![Go Report Card](https://goreportcard.com/badge/github.com/dveselov/go-mystem)](https://goreportcard.com/report/github.com/dveselov/mystem) [![Coverage Status](https://coveralls.io/repos/github/dveselov/go-mystem/badge.svg)](https://coveralls.io/github/dveselov/go-mystem)
CGo bindings to Yandex.Mystem - russian morphology analyzer.# Install
```bash
$ wget https://github.com/yandex/tomita-parser/releases/download/v1.0/libmystem_c_binding.so.linux_x64.zip
$ unzip libmystem_c_binding.so.linux_x64.zip
$ sudo cp libmystem_c_binding.so /usr/lib/
$ sudo ln -s /usr/lib/libmystem_c_binding.so /usr/lib/libmystem_c_binding.so.1
$ go get -u github.com/dveselov/mystem
```# Usage
```go
package mainimport (
"fmt"
)import "github.com/dveselov/mystem"
func main() {
analyses := mystem.NewAnalyses("маша")
defer analyses.Close()
fmt.Println(fmt.Sprintf("Analyze of '%s':", "маша"))
for i := 0; i < analyses.Count(); i++ {
lemma := analyses.GetLemma(i)
grammemes := lemma.StemGram()
fmt.Println(fmt.Sprintf("%d. %s - %v", i+1, lemma.Text(), grammemes))
}
}
```
Output'll looks like this:
```
Analyze of 'маша':
1. маша - [136 155 191 201]
2. махать - [137 196 206]
```# License
Source code of `go-mystem` is licensed under MIT license, but Yandex.Mystem have their own [EULA](https://yandex.ru/legal/mystem/) (allows commercial use), that you must accept.