JAWS is an API that provides Java applications the ability to access WordNet. It is a simple and fast API that is compatible with both the 2.1 and 3.0 versions of the WordNet database files.
To use JAWS in your application you must do the following:
- Obtain a copy of the WordNet database files. To download them with Maven, run
mvn generate-test-resources
which will download WordNet 3.0 into thetarget/WordNet-3.0/dict
directory (make sure you setup yourtoolchains.xml
file). - Generate a JAR file containing the compiled JAWS code. Executing
mvn package
will generate a JAR and put it in thetarget/
directory. - Include the JAWS JAR file in your Java Virtual Machine's class path.
- Use the
wordnet.database.dir
system property to specify the directory where the WordNet database files are located. If you used Maven to download the files, this directory will bePROJECT_DIR/target/WordNet-3.0/dict
, wherePROJECT_DIR
is the path to where you checked out this repository.
For an example, see the WordNetDatabaseTest.
JAWS was developed by Terrill Brett Spell as a class project in CSE 8337 in Spring 2007, as part of the SMU Database Research Group. Brett Spell was an adjunct member of the faculty in the Computer Science and Engineering (CSE) department at Southern Methodist University.
This repository is based on the original JAWS 1.3 source code (it's the first commit to this repository).
This project uses the Maven Toolchains Plugin for more reproducible builds.
To setup a JDK toolchain, you can start by downloading a JDK from Adoptium. The long-term support (LTS) release for the JDK is 21
, as of Nov 2023. Extract the JDK to a directory on your computer, which we reference as /path/to/jdk21
. Finally, put the following in your ~/.m2/toolchains.xml
file:
<?xml version="1.0" encoding="UTF8"?>
<toolchains>
<!-- JDK toolchains -->
<toolchain>
<type>jdk</type>
<provides>
<version>21</version>
<vendor>openjdk</vendor>
</provides>
<configuration>
<jdkHome>/path/to/jdk21</jdkHome>
</configuration>
</toolchain>
</toolchains>
IMPORTANT: Make sure to replace /path/to/jdk21
with the actual path to where you extracted the JDK.