Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/koron/gomigemo
Go/Migemo implementation
https://github.com/koron/gomigemo
go golang
Last synced: about 12 hours 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 (over 11 years ago)
- Default Branch: main
- Last Pushed: 2024-07-29T14:15:04.000Z (2 months ago)
- Last Synced: 2024-07-29T18:59:30.833Z (2 months ago)
- Topics: go, golang
- Language: Go
- Homepage:
- Size: 11.1 MB
- Stars: 46
- Watchers: 8
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Go/Migemo module
[![PkgGoDev](https://pkg.go.dev/badge/github.com/koron/gomigemo)](https://pkg.go.dev/github.com/koron/gomigemo)
[![Actions/Go](https://github.com/koron/gomigemo/workflows/Go/badge.svg)](https://github.com/koron/gomigemo/actions?query=workflow%3AGo)
[![Go Report Card](https://goreportcard.com/badge/github.com/koron/gomigemo)](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.