本文介绍了字典的API的Java(寻找意义的字)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好谁能告诉我如何访问Java中的字典吗?我需要的API,这样,我可以访问所有的字典里的单词和含义。

Hello everyone can anyone tell me how to access the dictionary in Java? I need API for that such that I can access all the dictionary words and meanings.

推荐答案

数据库。

JWKTL looks like a good place to start although I haven't tried it myself. It gets the words and definitions from the Wiktionary database.

实例:

Wiktionary wiktionary = new Wiktionary(DB_PATH, Language.GERMAN);
wiktionary.addWiktionary(DB_PATH, Language.English);
wiktionary.setWordLanguage(Language.German);
List<WiktionaryWord> wordList = wiktionary.getWords("bank");

这篇关于字典的API的Java(寻找意义的字)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 21:12