Giter Club home page Giter Club logo

akasabi's Introduction

赤錆(あかさび)

Akasabi (rust) is a command line English/Japanese dictionary. It's heavily inspired by myougiden (but only the output format is lifted directly from it).

It works by parsing the EDICT dictionary file, and creating a searchable index with tantivy that allows searching by meaning, reading, or kanji.

Usage

Installing

tbd

Creating the index

To create the index, run akasabi index --path <path to JMdict_e.xml>. You can use --index to specify the path to the index, which currently defaults to ./tmp in the current directory.

Searching

Once the index is created, you can search it with akasabi search <query>. The query can be a word, a reading, or a meaning. The search is case-insensitive1, and will return all matches that contain the query. You can also specify --field <field> to search only a specific field (meaning, reading, or kanji).

Dependencies

I hope to keep the dependency list short enought that maintaining this list is feasible. Currently, the dependencies are:

  • clap: CLI argument parsing
  • yansi: ANSI color codes
  • tantivy: core search functionality
  • env_logger: set log levels by environment variable
  • anyhow: error handling
  • flate2: decompress gzipped files (jmdict is distributed gzipped)
  • itertools: iterator utilities
  • reqwest: HTTP client for downloading jmdict (currently not fully implemented)
  • wana_kana: romaji <-> kana conversion
  • xml: XML parsing
  • etcetera: get the user data directory (for the default index path)
  • lindera: Japanese morphological analysis/tokenization
  • tempfile: temporary file creation (used in tests only)

License

Licensed under either of

at your option.

In addition, testdata/JMdict_e_test.gz is a small subset of JMdict_e.xml, which is licensed under the Creative Commons Attribution-ShareAlike Licence (V4.0).

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Footnotes

  1. TODO: Verify that this is actually the case.

akasabi's People

Contributors

itsbth avatar renovate[bot] avatar

Watchers

 avatar  avatar

akasabi's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • fix(deps): update rust crate clap to v4.5.4
  • fix(deps): update rust crate env_logger to 0.11.0
  • fix(deps): update rust crate tantivy to 0.22.0
  • chore(deps): update actions/checkout action to v4
  • fix(deps): update rust crate yansi to v1
  • 🔐 Create all rate-limited PRs at once 🔐

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

cargo
Cargo.toml
  • anyhow 1.0.71
  • clap 4.3.4
  • env_logger 0.10.0
  • etcetera 0.8.0
  • flate2 1.0.26
  • itertools 0.10.5
  • lindera-core 0.25.0
  • lindera-dictionary 0.25.0
  • lindera-tantivy 0.25.0
  • reqwest 0.11.18
  • tantivy 0.20.2
  • wana_kana 3.0.0
  • xml 0.8.10
  • yansi 0.5.1
  • tempfile 3.6.0
  • nix 0.26.2
github-actions
.github/workflows/rust.yml
  • actions/checkout v3
  • actions/checkout v3
  • EmbarkStudios/cargo-deny-action v1

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.