Java Libraries for Accessing the Princeton Wordnet: Comparison and Evaluation

Java is a popular programming language for natural language processing. I compare and evaluate 12 Java libraries designed to access the information in the original Princeton Wordnet databases. From this comparison emerges a set of decision criteria that will enable a user to pick the library most suited to their purposes. I identify five deciding features: (1) availability of similarity metrics; (2) support for editing; (3) availability via Maven; (4) compatibility with retired Java versions; and (5) support for Enterprise Java. I also provide a comparison of other features of each library, the information exposed by each API, and the versions of Wordnet each library supports, and I evaluate each library for the speed of various retrieval operations. In the case that the user’s application does not require one of the deciding features, I show that my library, JWI, the MIT Java Wordnet Interface, is the highest-performance, widest-coverage, easiest-to-use library available. A Java developer seeking to access the Princeton Wordnet is faced with a bewildering array of choices: there are no fewer than 12 Java libraries that provide off-the-shelf access to Wordnet data, each with various combinations of features and performance. In addition to these 12 libraries, there are also at least 12 additional libraries1 that, while not providing direct access to Wordnet data themselves, provide functions such as similarity metrics and deployment of Wordnet data to database servers. In this paper I compare, contrast, and evaluate each of the 12 libraries2 that provide direct access to the Princeton Wordnet data, so as to help Java developers find the library See Table 6 for a list of all libraries and their URLs. I have made my best effort to be as complete as possible in identifying libraries that support access to Wordnet. It is possible, however, that I have missed some more obscure libraries, especially libraries whose primary purpose is not Wordnet access but some other function. that is right for their application. To my knowledge this is the first paper to attempt a thorough comparison of any of these libraries. I proceed as follows. First I present the bottom line, which is a set of five deciding features most commonly encountered when using Wordnet in a Java. I then discuss other features that distinguish some libraries from the others. I present an assessment of what Wordnet data is accessible via which library, and which libraries are compatible with which Princeton Wordnet versions. I also evaluate the performance of each library on nine different retrieval metrics, as well as the time to initialize in-memory Wordnet dictionaries for those libraries that suport that function. The code for reproducing the evaluation (including all required source code, copies of all the described libraries, and the various versions of Wordnet) is available online.3 While the software evaluated in this paper is exclusively for Java, and is limited to libraries available at the time of writing that are designed for accessing the original Princeton Wordnet, this work should be helpful to those who seek to evaluate other application programming interfaces (APIs) for interacting with Wordnet data. In particular the set of features identified here and the set of retrieval metrics should be of some use. 1 Deciding on a Library Before discussing the feature and performance evaluation in detail I will lay out the bottom line: which library a developer should choose if your application falls into one of the common situations described below. First, I will outline which library a developer should choose if there are no particular constraints. Next, I list five deciding features that, if an application needs that feature, will deVia the MIT DSpace repository as an MIT CSAIL Work Product: http://hdl.handle. net/1721.1/81949