简体   繁体   中英

Find synonym and root of a word in java

I am developing a JAVA application where user enters a word in textbox,the synonyms of the word has to be autoprompted to him.

Given a word,is it possible to find its synonyms and its root in JAVA?should i use a dictionary?

eg:

word:   killer
synonym: murderer butcher hitman

word:   killing
root:   kill

一种选择是将WordNet与Java API一起使用,例如JAWS: http//lyle.smu.edu/~tspell/jaws

As for roots this process is called stemming (google for that). There are some (Java) libraries like that: http://snowball.tartarus.org/download.php

I would suggest looking for an API for a online site where you can access a synonym dictionary instead of having to build your own. It will be large enough that you will not want to keep it in memory therefore you are going to have to have some external storage location if you are going to do it yourself.

你必须使用字典,至少对于同义词,因为JRE中没有标准的“同义词列表”。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM