Convert verbs to base form by using Wordnet in Java

A verb can occurs in a sentence in various format such as base form, past tense, past participle, 3rd person singular present, etc. To have a general idea of how each word occurs, we often need to get base form of a word.

This examples shows how to convert a verb to its base form by using Java API for Wordnet – JAWS. I will do this in eclipse environment and Ubuntu.

1. Create a Java project called “TestJAWS” in your work space.

2. Go to Wordnet(, and download “tar-gzipped: WordNet-3.0.tar.gz”.

Note: it is not just database file.

3. Unzip it, and copy dict direction to your workspace, let’s say “/home/mike/somedir/dict/”. The “dict” directory should contain the following files:

4. Download JAWS jar file:, and add it to your project build path. (right click the project -> Build path -> Configure build path -> Libraries -> add External Jars -> done)

5. The following is the code of finding base form of verb “implements”

public static void main(String[] args) {
		System.setProperty("wordnet.database.dir", "/home/.../wordnet/dict/");
		WordNetDatabase database = WordNetDatabase.getFileInstance();
		Morphology id = Morphology.getInstance();
		String[] arr = id.getBaseFormCandidates("implements", SynsetType.VERB);
		for(String a: arr)

If you are curious about what other things JAWS can do, go to JAWS Java Doc:

3 thoughts on “Convert verbs to base form by using Wordnet in Java”

  1. I’m getting “Morphology not resolved error”. Is there any other jar files which I need to include? I had installed wordnet in ubuntu by sudo apt-get install command and hence I wordnet location in System.setProperty(). So is this the cause for the error??

    thanks in advance

  2. I follow your guide, but axis2 generate this error:

    org.apache.axis2.AxisFault: edu/smu/tspell/wordnet/WordNetDatabase
    at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(
    at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(
    at org.apache.axis2.description.OutInAxisOperationClient.send(
    at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(

    The server said:

    [ERROR] edu/smu/tspell/wordnet/WordNetDatabase
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    at java.lang.reflect.Method.invoke(
    at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(
    at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(
    at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(
    at org.apache.axis2.receivers.AbstractMessageReceiver.receive(
    at org.apache.axis2.engine.AxisEngine.receive(
    at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(
    at org.apache.axis2.transport.http.AxisServlet.doPost(
    at javax.servlet.http.HttpServlet.service(
    at javax.servlet.http.HttpServlet.service(
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(
    at org.apache.catalina.core.StandardWrapperValve.invoke(
    at org.apache.catalina.core.StandardContextValve.invoke(
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
    at org.apache.catalina.core.StandardHostValve.invoke(
    at org.apache.catalina.valves.ErrorReportValve.invoke(
    at org.apache.catalina.valves.AccessLogValve.invoke(
    at org.apache.catalina.core.StandardEngineValve.invoke(
    at org.apache.catalina.connector.CoyoteAdapter.service(
    at org.apache.coyote.http11.AbstractHttp11Processor.process(
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
    at java.util.concurrent.ThreadPoolExecutor$
    Caused by: java.lang.NoClassDefFoundError: edu/smu/tspell/wordnet/WordNetDatabase


Leave a Comment