koron / gomigemo

Go/Migemo implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Go/Migemo module

PkgGoDev GoDoc Actions/Go Go Report Card

Usage

To load dictionary files from file system:

// Import migemo package.
import "github.com/koron/gomigemo/migemo"

// Load dictionary files.
dict, err := migemo.LoadDefault()

// Compile to get *regexp.Regexp.
re, err := migemo.Compile(dict, "aiueo")

To embedded dictionary to the executable file:

// Import migemo and embedict package.
import (
    "github.com/koron/gomigemo/embedict"
    "github.com/koron/gomigemo/migemo"
)

// Load embedded dictionary.
dict, err := embedict.Load()

// Compile to get *regexp.Regexp.
re, err := migemo.Compile(dict, "aiueo")

LICENSE

Distributed under MIT License, except for _dict/SKK-JISYO.utf-8.L and embedict/bindata.go which is GPL.

See LICENSE.

About

Go/Migemo implementation

License:MIT License


Languages

Language:Go 98.4%Language:Makefile 1.6%