What is jwnl?
Jwnl isAPIFor accessing WordNet-style relational dictionaries. It also provides functionality beyond data access, such as relationship discovery and orphological processing.
Jwnl is an API of WordNet used to access the dictionary in WordNet. jwnl is a Java-based package.
Before using jwnl:
1. Download The wordnetpackage from http://wordnet.princeton.edu/wordnet/download/, and I will use the wordnet2.1 in winmode;
2. Step-by-Step wordnet2.1 installation;
3. Slave nodes;
4. Find the file_properties.xml file under the jwnl14-rc2/config file, open it, find the following sentence:
<Version publisher = "Princeton" number = "2.0" Language = "en"/>
Number indicates the WordNet version number you are using. When I use 2.1, I change the value to 2.1;
5. Continue to find this sentence:
<Param name = "dictionary_path" value = "C:/program files/WordNet/2.0/dict"/>
Change the value to the directory where WordNet is actually installed;
6. Place the jwnl under the root directory of the jwnl14-rc2. jar and jwnl14-rc2/lib under the commons-logging.jar and junit-4.1.jar copy to JDK lib directory, and add these three package directory values in the environment variable classpath.
From: http://blog.csdn.net/chz870128/article/details/6284170
The examples. Java instance in jwnl is used in Eclipse:
1. Examples. Java exists in the directory of jwnl14-rc2/src/NET/Didion/jwnl/utilities;
2. Create a New Java project in eclipse;
3. copy and paste the net folder under the jwnl14-rc2/src directory to the newly created Java project;
4. include additional runtime libraries: Right-click the project and choose build path> Configure build path... -> select the libraries label in the Java build path-> Add external jars ..., locate and set jwnl. jar and commons-logging.jar are included;
4. In the running configuration corresponding to examples. Java, set the ARGs parameter:
F:/eclipseworkspace/utilities/src/NET/Didion/jwnl/utilities/file_properties.xml
That is, the file_properties.xml file path;
Problems encountered during self-installation:
Eclipse error:
Exception in thread "Main" Java. Lang. Error: unresolved compilation problem:
Invalid escape sequence (valid ones are \ B \ t \ n \ f \ r \"\'\\)
At net. Didion. jwnl. Utilities. Examples. Main (examples. Java: 36)
It is only because "/" in the path is not converted into escape characters, so you can simply convert "\" -->.
5. Run examples.