Documentation
¶
Overview ¶
Package dajareGo provides checking a sentence if it is Dajare (Japanese pun).
Definition of Dajare ¶
In this Package, Dajare is defined the sentence contains pair(s) of words which has a similar reading but a different meaning.
How to Use ¶
You can check if a sentence is Dajare with IsDajare function, like below.
if err := dajareGo.Init(); err != nil {
panic(err)
}
result := dajareGo.IsDajare("アルミ缶の上にあるミカン")
if result.IsDajare {
fmt.Println("This is Dajare")
} else {
fmt.Println("This is not Dajare")
}
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetCustomDictionary ¶
Set dictionary you like. You can use a Kagome Dictionary. https://github.com/ikawaha/kagome#dictionaries
Types ¶
type Result ¶
type Result struct {
// If it is Dajare, this field is True, else False.
IsDajare bool
// This field shows an index of all word which has a similar reading but a different meaning
DajareWordIndex []int
// a pair of sentence and its Syllables
Sentence Token
// Tokens of given sentence
Tokens []Token
}
Result has a result of IsDajare function.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.