Mojibox is a Java library for working with a Kanji dictionary. It provides functionality to search through Kanji data efficiently.
You can include Mojibox in your Maven project by adding the following dependency to your pom.xml
:
<dependency>
<groupId>io.github.aliasbretaud</groupId>
<artifactId>mojibox</artifactId>
<version>0.0.4</version>
</dependency>
To use Mojibox in your Java project, you can follow these steps:
-
Include Dependency: Make sure Mojibox is included in your project's dependencies as shown above.
-
Instantiate KanjiDictionary: Create an instance of
KanjiDictionary
to access Kanji data. -
Search Kanji: Use the
searchKanji()
method to search for a specific Kanji by its literal.
KanjiDictionary dictionary = new KanjiDictionary();
KanjiEntry kanji = dictionary.searchKanji("漢");
- Access Kanji Data: Once you have a Kanji object, you can access its readings, meanings, and other information.
import io.github.aliasbretaud.mojibox.enums.MeaningLanguage;
import io.github.aliasbretaud.mojibox.enums.ReadingType;
String literal = kanji.getLiteral();
List<String> readings = kanji.getReading(ReadingType.JA_ON);
List<String> meanings = kanji.getMeaning(MeaningLanguage.EN);
Mojibox utilizes a simplified version of the KANJIDIC dictionary. KANJIDIC is a project focused on providing comprehensive data about Kanji characters.
For more information about Mojibox and its usage, please refer to the documentation (coming soon).
This project is licensed under the MIT License.