kanji_dictionary 1.0.0+1 copy "kanji_dictionary: ^1.0.0+1" to clipboard
kanji_dictionary: ^1.0.0+1 copied to clipboard

Dart implementation of KANJIDIC, a popular Kanji dictionary used by jisho.org.

Kanji Dictionary #

pub package

Dart implementation of KANJIDIC, a popular Kanji dictionary used by jisho.org. See http://www.edrdg.org/wiki/index.php/KANJIDIC_Project.

Features #

  • lists out all the characters of KANJIDIC.
  • meanings per language.
  • difficulty by jlpt level and grade.
  • can also parse a custom version of KANJIDIC xml.

Getting started #

Add the package as a dependency.

Usage #

Basic usage #

import 'package:kanji_dictionary/kanji_dictionary.dart';

void main() {
  final kanjiDictionary = KanjiDictionary.instance;
  final character = kanjiDictionary.characters.first;
  print(character.literal);
  print(character.getMeanings(Language.english));
  print(character.difficulty.jlpt);
}

Prints out:

亜
[Asia, rank next, come after, -ous]
1

Using your own custom KANJIDIC xml #

import 'dart:io';

main() {
  final xmlKanjidic = File([your own kanjidic2.xml]).readAsStringSync();
  final kanjiDictionary = KanjiDictionary.fromXml(XmlDocument.parse(xmlKanjidic));
}

Contributing #

If you want to contribute, you should clone the project, then generate kanjidic2xml.dart by running:

dart bin/generate_kanji_dic2_const.dart
2
likes
0
pub points
31%
popularity

Publisher

verified publisherwafrat.com

Dart implementation of KANJIDIC, a popular Kanji dictionary used by jisho.org.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

xml

More

Packages that depend on kanji_dictionary