Skip to content
pubscout

kana_kit

2.1.1, released 2 years ago by jfk.dev

Detect and transliterate Japanese Hiragana, Katakana, and Romaji.

WASM-ready
$ flutter pub add kana_kit
Source repository

What it does

A Dart library ported from WanaKana that checks whether text contains Japanese characters, Hiragana, Katakana, Kanji, or Romaji. It also handles transliteration between Hiragana, Katakana, and Romaji.

AI-written summary of version 2.1.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to transliterate between Japanese scripts (Hiragana, Katakana, Romaji) in Dart or Flutter.
  • You need to validate Japanese text inputs to check for specific scripts like Kanji or Kana.

Skip it when

  • You need a full Japanese morphological dictionary parser or translation dictionary.
  • You need complex Japanese text tokenization or NLP part-of-speech tagging.

Strengths

  • Direct port of the widely-used WanaKana library with high reliability.
  • Supports multiple platforms including Android, iOS, Web, Windows, macOS, and Linux.
  • Provides configuration options such as upcasing converted Katakana.

Weaknesses

  • Limited to script detection and transliteration rather than full language translation or parsing.
  • Does not handle complex Kanji reading lookups without additional libraries.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
3

Not documented

const kanaKit = KanaKit();
kanaKit.isJapanese('泣き虫。!~2¥zenkaku');
kanaKit.toHiragana('toukyou, オオサカ');

Works with

Packages commonly used together with kana_kit: ones it builds on, ones built on it, and its own family.