Documentation ¶
Index ¶
Constants ¶
View Source
const ( I_bookname = "bookname" I_wordcount = "wordcount" I_description = "description" I_idxfilesize = "idxfilesize" I_sametypesequence = "sametypesequence" I_idxoffsetbits = "idxoffsetbits" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArticleItem ¶
type Dict ¶
type Dict struct {
// contains filtered or unexported fields
}
Dict implements in-memory dictionary
func (*Dict) GetSequence ¶
GetSequence returns data at the given offset
type Info ¶
Info contains dictionary options
func (Info) Description ¶
func (Info) EntryCount ¶
EntryCount returns number of words in the dictionary
func (Info) IndexFileSize ¶
func (Info) MaxIdxBytes ¶
type StarDictReader ¶
type StarDictReader struct { *Info // contains filtered or unexported fields }
dictionaryImp stardict dictionary
func NewReader ¶
func NewReader(path string, name string) (*StarDictReader, error)
NewReader returns a new Dictionary path - path to dictionary files name - name of dictionary to parse
func (*StarDictReader) Close ¶
func (d *StarDictReader) Close()
func (*StarDictReader) DictName ¶
func (d *StarDictReader) DictName() string
DictName returns book name
func (*StarDictReader) IndexPath ¶
func (d *StarDictReader) IndexPath() string
func (*StarDictReader) InfoPath ¶
func (d *StarDictReader) InfoPath() string
func (*StarDictReader) Loaded ¶
func (d *StarDictReader) Loaded() bool
func (*StarDictReader) Read ¶
func (r *StarDictReader) Read() (func() ([]string, []*ArticleItem), error)
Click to show internal directories.
Click to hide internal directories.