func (m *Migemo) Pattern(query string, pattern *string) error { p, err := migemo.Pattern(m.dict, query) if err != nil { return err } *pattern = p return nil }
func main() { dict, err := migemo.Load("./_dict") if err != nil { log.Fatal(err) } pat, err := migemo.Pattern(dict, "ai") if err != nil { log.Fatal(err) } fmt.Printf("pattern=%s\n", pat) }