Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dict ¶
type Dict struct {
// contains filtered or unexported fields
}
Dict implements in-memory dictionary
type Dictionary ¶
type Dictionary struct {
// contains filtered or unexported fields
}
Dictionary stardict dictionary
func NewDictionary ¶
func NewDictionary(path string, name string) (*Dictionary, error)
NewDictionary returns a new Dictionary path - path to dictionary files name - name of dictionary to parse
func (Dictionary) GetBookName ¶
func (d Dictionary) GetBookName() string
GetBookName returns book name
func (Dictionary) GetWordCount ¶
func (d Dictionary) GetWordCount() uint64
GetWordCount returns number of words in the dictionary
func (Dictionary) Translate ¶
func (d Dictionary) Translate(item string) (items []*Translation)
Translate translates given item
type Idx ¶
type Idx struct {
// contains filtered or unexported fields
}
Idx implements an in-memory index for a dictionary
func ReadIndex ¶
ReadIndex reads dictionary index into a memory and returns in-memory index structure
type Translation ¶
type Translation struct {
Parts []*TranslationItem
}
Translation contains translation items
type TranslationItem ¶
TranslationItem contain single translation item
Click to show internal directories.
Click to hide internal directories.