Gomamayo provides checking a term if it is Gomamayo.
Gomamayo is a term which has consecutive pronunciation between words, like Goma-mayo salad and Ghost Trick.
First, import go-mamayo to your project.
go get github.com/jugesuke/gomamayo
import "github.com/jugesuke/gomamayo"
Next, create *gomamayo.GoMamayo
.
g, err := gomamayo.Init()
if err != nil {
panic(err)
}
Next, use Analyze
function.
result := g.Analyze("ゴママヨサラダ")
To get the result if the term is Gomamayo, use result.IsGomamayo
.
result := g.Analyze("ゴママヨサラダ")
if result.IsGomamayo {
fmt.Println("This is Gomamayo")
} else {
fmt.Println("This is not Gomamayo")
}