Categorygithub.com/vench/morph
repositorypackage
0.0.1
Repository: https://github.com/vench/morph.git
Documentation: pkg.go.dev

# README

morph License GoDoc Build Status

A morphological analyzer for Russian language, using dictionaries from pymorphy2.

Install

The package:

go get -u github.com/opennota/morph

And the dictionaries:

pip install --user pymorphy2-dicts-ru

Use

package main
import (
    "fmt"
    "github.com/opennota/morph"
)
func main() {
    words, norms, tags := morph.Parse("все")
    for i := range words {
        fmt.Printf("%-4s %-5s %s\n", words[i], norms[i], tags[i])
    }
}

Output:

все  весь  ADJF,Subx,Apro plur,nomn
все  весь  ADJF,Subx,Apro inan,plur,accs
всё  всё   PRCL
всё  весь  ADJF,Subx,Apro neut,sing,nomn
всё  весь  ADJF,Subx,Apro neut,sing,accs