Skip to content

Repository files navigation

go-mdict

Go library for reading MDX/MDD dictionary files.

Features

  • Read MDX dictionary files
  • Read MDD resource files
  • Support for compressed data (LZO)
  • Keyword search and lookup

Installation

go get github.com/intellifuture/go-mdict

Usage

import go_mdict "github.com/intellifuture/go-mdict"

// Create a new mdict reader
mdict, err := go_mdict.New("path/to/dictionary.mdx")
if err != nil {
    log.Fatal(err)
}

// Build index
if err := mdict.BuildIndex(); err != nil {
    log.Fatal(err)
}

// Lookup a keyword
content, err := mdict.Lookup("keyword")
if err != nil {
    log.Fatal(err)
}

// Get total entries count
count := mdict.GetTotalEntriesCount()

License

[Add your license here]

About

mdx parser code copied from repo https://github.com/terasum/medict

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages