Activity for JWNL (Java WordNet Library)

  • Nabeel Naqeebi Nabeel Naqeebi posted a comment on discussion Help

    hey every one, I want to get All the hypernyms of a specific word(i.e. apple) and here is the code, kindly change in it. Code;- private void demonstrateListOperation(IndexWord word) throws JWNLException { // Get all of the hypernyms (parents) of the first sense of word PointerTargetNodeList hypernyms = PointerUtils.getInstance().getDirectHypernyms(word.getSense(1)); System.out.println("Direct hypernyms of \"" + word.getLemma() + "\":"); hypernyms.print();

  • Nabeel Naqeebi Nabeel Naqeebi posted a comment on discussion Help

    hey every one, I want to get All the hypernyms of a specific word(i.e. apple) and here is the code, kindly change in it. Code;- private void demonstrateListOperation(IndexWord word) throws JWNLException { // Get all of the hypernyms (parents) of the first sense of word PointerTargetNodeList hypernyms = PointerUtils.getInstance().getDirectHypernyms(word.getSense(1)); System.out.println("Direct hypernyms of \"" + word.getLemma() + "\":"); hypernyms.print();

  • Alessandro Chillemi Alessandro Chillemi posted a comment on discussion Help

    Hi! I created a small Java plugin for Apache Solr that has to retrieve synonyms of some terms from WordNet and I'm using JWNL. I initialize the dictionary using: try { JWNL.initialize(new FileInputStream("properties.xml")); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (JWNLException e) { e.printStackTrace(); } final Dictionary dictionary = Dictionary.getInstance(); My properties.xml looks like this: <?xml version="1.0" encoding="UTF-8"?> <jwnl_properties language="en"> <version...

  • Jack Park Jack Park posted a comment on discussion Open Discussion

    Seems there are edge cases where the null pointer can happen for some words. The fix is to add a test for null: for (int i = 0; i < pointers.length; ++i) { if (pointers[i].getType() != null) { //ADDED JP if (pointers[i].getType().equals(type) ...

  • Harry Delugach Harry Delugach posted a comment on discussion Open Discussion

    Thanks! This fix is still needed as of Wordnet 3.1 with JWNL 1.4

1
MongoDB Logo MongoDB