开发者

Java compatible English Dictionary API?

I am trying to mimic a simple news reader, a desktop application developed on swings. As a part of this I am looking at including a dictionary lookup for a word f开发者_如何转开发rom within the tool. I am looking at trying to display the meaning for word as a tool tip that appears upon a double click on JTextpane's content(one single word).

So is there an exposed API for dictionary look-up? Also considering the fact that I am using java swings, the speed with which the API performs dictionary look up is also a key concern in my case..


The main thing you need to a table of words and meanings. Once you have that the rest should be straight forward.

For a dictionary loop, you could use a Dictionary class, but I would use LinkedHashMap<String, String> to store words and meanings. This will take less than one micro-second to do the lookup get(), which should be fast enough.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜