https://github.com/koron/gomigemo
Go/Migemo implementation
https://github.com/koron/gomigemo
go golang
Last synced: 10 months ago
JSON representation
Go/Migemo implementation
- Host: GitHub
- URL: https://github.com/koron/gomigemo
- Owner: koron
- License: mit
- Created: 2013-06-09T13:51:05.000Z (about 13 years ago)
- Default Branch: main
- Last Pushed: 2024-07-29T14:15:04.000Z (almost 2 years ago)
- Last Synced: 2025-08-14T01:49:33.243Z (11 months ago)
- Topics: go, golang
- Language: Go
- Homepage:
- Size: 11.1 MB
- Stars: 47
- Watchers: 6
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Go/Migemo module
[](https://pkg.go.dev/github.com/koron/gomigemo)
[](https://github.com/koron/gomigemo/actions?query=workflow%3AGo)
[](https://goreportcard.com/report/github.com/koron/gomigemo)
## Install and Update
```console
$ go get github.com/koron/gomigemo@latest
```
## Usage
To load dictionary files from file system:
```go
// 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:
```go
// 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.