Package Exports
- en-ka
- en-ka/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (en-ka) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
en-ka (English to Katakana Converter)
A CLI tool that converts English words to Japanese Katakana using the comprehensive JMDict dictionary.
Features
- Accurate conversions using the JMDict dictionary
- Fuzzy search for typos and partial matches
- Rich output with kanji, hiragana, romaji, and meanings
- Smart filtering prioritizes common words
- Fast local search with indexed dictionary data
Installation
# Clone the repository
git clone https://github.com/your-username/en-ka.git
cd en-ka
# Install dependencies
npm install
# Build the project
npm run build
# Install globally (optional)
npm install -g .Usage
Basic conversion
en-ka computer
# Output: コンピューター [COMMON]
en-ka server
# Output: サーバー [COMMON]Fuzzy search (enabled by default)
en-ka servr
# Output: サーバー [COMMON] (matched "server")
# Disable fuzzy search for exact match only
en-ka --no-fuzzy serverVerbose output
en-ka -v computer
# Output:
# 1. コンピューター [COMMON]
# Hiragana: こんぴゅーたー
# Romaji: konpyūtā
# Meaning: computer, electronic brainMultiple results
en-ka -m 5 game
# Shows up to 5 resultsWord suggestions
en-ka suggest comp
# Output:
# Suggestions for "comp":
# 1. computer
# 2. company
# 3. completeUpdate dictionary
en-ka update
# Downloads latest JMDict dataOptions
--no-fuzzy- Disable fuzzy search (exact match only)-v, --verbose- Show detailed information (hiragana, romaji, meaning)-m, --max <number>- Maximum number of results (default: 10)
Examples
# IT terms
en-ka database # → データベース
en-ka application # → アプリケーション
en-ka programming # → プログラミング
# Common words
en-ka coffee # → コーヒー
en-ka television # → テレビ
en-ka telephone # → 電話
# With fuzzy search (default behavior)
en-ka databse # → データベース (corrects "databse")
# Exact match only
en-ka --no-fuzzy databse # → No results (typo not corrected)Data Source
This tool uses the JMDict Japanese-Multilingual Dictionary, specifically the simplified JSON version from jmdict-simplified.
Dictionary License
The JMDict dictionary data is licensed under Creative Commons Attribution-ShareAlike 4.0 License. The original data is compiled by the Electronic Dictionary Research and Development Group.
JMDict License: Creative Commons Attribution-ShareAlike 4.0 Original Source: EDRDG JMDict Project JSON Format: scriptin/jmdict-simplified
The dictionary is automatically downloaded on first use of the application.
Development
# Development mode
npm run dev
# Type checking
npm run lint:type-check
# Linting
npm run lint-fix
# Build
npm run buildLicense
MIT