Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Logger logger.Logger = logger.NewNop()
Functions ¶
This section is empty.
Types ¶
type DefaultThesauruser ¶
type DefaultThesauruser struct {
// contains filtered or unexported fields
}
func NewDefaultThesauruser ¶
func NewDefaultThesauruser(key string) *DefaultThesauruser
NewDefaultThesauruser constructor for default API access
type Thesaurus ¶
type Thesaurus struct {
Thesauruser
}
func NewThesaurus ¶
func NewThesaurus(getWord Thesauruser) *Thesaurus
func NewThesaurusDefault ¶
type Thesauruser ¶
type Word ¶
type Word struct { Meta struct { Id string `json:"id"` //Uuid string `json:"uuid"` //Src string `json:"src"` //Section string `json:"section"` //Target struct { // Tuuid string `json:"tuuid"` // Tsrc string `json:"tsrc"` //} `json:"target"` //Stems []string `json:"stems"` Syns [][]string `json:"syns"` Ants [][]string `json:"ants"` Offensive bool `json:"offensive"` } `json:"meta"` //Hwi struct { // Hw string `json:"hw"` //} `json:"hwi"` Fl string `json:"fl"` //Def []struct { // Sseq [][][]interface{} `json:"sseq"` //} `json:"def"` Shortdef []string `json:"shortdef"` }
Word - structured json, which is received from MerriamWebster, see https://www.dictionaryapi.com/products/json#sec-3 Deliberately, there are a lot of tags commented - they are not needed by package, however left them as maybe required someday
func (*Word) Definition ¶
Definition simplified access to definition of certain Word
func (*Word) IsOffensive ¶
IsOffensive returns true, whether word is considered as offensive
Click to show internal directories.
Click to hide internal directories.