Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8547583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:17:49+00:00 2026-06-11T13:17:49+00:00

I wanted to add a new synset to Wordnet using the extjwnl library .

  • 0

I wanted to add a new synset to Wordnet using the extjwnl library. In order to do this, I wrote the following sample code. After saving, I observe that the new synonym and word do get added, but the semantic pointer created (which identifies the hyponymy relation) is not saved. How do I relate the pointer to the dictionary?

        JWNL.initialize(new FileInputStream(propsFile));
        Dictionary dictionary = Dictionary.getInstance();
        Iterator<Synset> synsets = dictionary.getSynsetIterator(POS.NOUN);

        dictionary.edit();
        Synset newSynset = new Synset(dictionary, POS.NOUN);
        IndexWord newWord = new IndexWord(dictionary, "hublabooboo", POS.NOUN, newSynset);
        Synset topmostSynset = synsets.next();
        Pointer newPointer = new Pointer(PointerType.HYPONYM, topmostSynset, newSynset);
        dictionary.save();
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T13:17:50+00:00Added an answer on June 11, 2026 at 1:17 pm

    I’d suggest you add pointer to the synset’s list of pointers:

      topmostSynset.getPointers().add(newPointer);
    

    If the pointer is symmetric (like hypernym, which has a mirror one: hyponym), and dictionary.getManageSymmetricPointers() then the reverse pointer (e.g. hyponym) is added automatically.

    By the way, by this code Synset topmostSynset = synsets.next(); it looks like you infer that the first returned synset from the synset iterator is the “entity” one. But this is not guaranteed anywhere. This is dictionary-dependent: might work for file-based, but most likely won’t for map-based and unpredictable for database-based.

    Source : SourceForge

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background: i'm using InstantRails 2.0 I wanted to add a new column to an
I'm after opinions please on this attempt at MVC using Java Graphics2D. I wanted
I wanted to add a new property to one of my model (table). Basically
I wanted to add <br> after every 2 loops. The loop will run 8
I am new to jqwicket. Basically I wanted to know how to add animation
I'm very new to lucene.net. I wrote this simple console app in C# which
Using EF 4.1 Code first I wanted to stop EF creating database from Models.
I have a lot of code that takes on the following pattern void Add(int
If I wanted to add a new item to a <List> with the Data
The user wants to add new fields in UI dynamically. This new field should

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.