extJWNL (Extended Java WordNet Library) is a Java API for creating, reading and updating dictionaries in WordNet format.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.md

Build Status

About

extJWNL (Extended Java WordNet Library) is a Java API for creating, reading and updating dictionaries in WordNet format. extJWNL supports:

  • writing dictionaries
  • encodings (including UTF-8)
  • Java generics
  • huge dictionaries
  • instance dictionaries
  • Maven support
  • documentation improvements
  • improved unit test coverage
  • enhanced database support
  • simplified configuration
  • multiple other improvements and fixes

Getting started

In the pom.xml:

<!-- main library dependency -->
<dependency>
    <groupId>net.sf.extjwnl</groupId>
    <artifactId>extjwnl</artifactId>
    <version>1.9.4</version>
</dependency>
<!-- Princeton WordNet 3.1 data dependency -->
<dependency>
    <groupId>net.sf.extjwnl</groupId>
    <artifactId>extjwnl-data-wn31</artifactId>
    <version>1.2</version>
</dependency>

In the code:

Dictionary d = Dictionary.getDefaultResourceInstance();

extJWNL contains Examples.java with examples of API use.

WordNet Data Dependencies

extJWNL can load WordNet data from resources on the classpath. One way to do that is to add a dependency like illustrated above. There are several dependencies available that contain data from Princeton WordNet:

Dependencies with text data contain original Princeton WordNet files augmented with extJWNL configuration file. Dependencies with serialized data contain Princeton WordNet files serialized into HashMaps and augmented with extJWNL configuration file.

Serialized data is larger, but might work faster for some use cases.

If you use Dictionary.getDefaultResourceInstance(), then make sure you use only one dependency.

Acknowledgements

YourKit logo

extJWNL is supported by YourKit Open Source License. YourKit, LLC is the creator of YourKit Java Profiler and YourKit .NET Profiler, innovative and intelligent tools for profiling Java and .NET applications.

Resources