14 lines
No EOL
635 B
Java
14 lines
No EOL
635 B
Java
// currently you need my fork:
|
|
// https://codeberg.org/hashirama/mdict4j
|
|
|
|
try {
|
|
Path dictionaryPath = Paths.get("(学研)漢字源[改訂第五版].mdx");
|
|
MDictDictionary dictionary = MDictDictionary.loadDictionary(dictionaryPath.toString());
|
|
System.out.println(dictionary.getTitle());
|
|
System.out.println(dictionary.getDescription());
|
|
for (var entry : dictionary.readArticles("来")) {
|
|
System.out.printf("%s -> %s%n", entry.getKey(), entry.getValue());
|
|
}
|
|
} catch (MDException e) {
|
|
e.printStackTrace();
|
|
} |