You may verify the results either by looking at wordnet data files or online here - http://wordnetweb.princeton.edu/perl/webwn
Thanks Aliaksandr for detailed explanation. This was very helpful. Sensekey will work for my use case. I think editing a wordnet in a database might be easier to handle. Is there any specific reason for not implementing editing in DatabaseBackedInstance? Regards, Vinod On Tue, 15 Dec 2020 at 14:40, Aliaksandr Autayeu autayeu@users.sourceforge.net wrote: First, about offsets as identifiers. This gives some background to your question. Most people use offsets as "sense identifiers". But they are bad...
Thanks Aliaksandr, this was helpful. Below are the steps that one should follow to update the gloss of a sense. START - - - // make editable dict.edit(); // get synset and update the gloss Synset synset = dict.getSynsetAt(pos, offsetId); synset.setGloss("new gloss"); // save, close and open dictionary dict.save(); dict.close(); dict = Dictionary.getFileBackedInstance(wordnet.dir); - - - END - - - While editing senses (gloss only), I ran into an issue where offset id of a sense was changed after some...
I am trying to update gloss for a sense using the below code snippet. Dictionary dict = Dictionary.getFileBackedInstance(wnDir); try { IndexWord iw = dict.lookupIndexWord(pos, word); for (Synset sense : iw.getSenses()) { if (sense.getOffset() == desired_offset) { dict.edit(); sense.setGloss("new gloss"); dict.save(); } } } catch (JWNLException e) { logger.error("Failed to edit dictionary", e); } Though sense does not get updated. Am I missing something here? Regards, Vinod
Could not find dict2db.bat in the source code. I am guessing that script must be calling DictionaryToDatabase.java https://github.com/extjwnl/extjwnl/blob/master/utilities/src/main/java/net/sf/extjwnl/utilities/DictionaryToDatabase.java. I will give it a try. Thanks for the direction, much apprecaited. Regards, Vinod On Fri, 16 Oct 2020 at 13:15, Aliaksandr Autayeu autayeu@users.sourceforge.net wrote: Perhaps DictionaryToDatabase.txt https://github.com/extjwnl/extjwnl/blob/master/utilities/doc/DictionaryToDatabase.txt...
I have found extjwnl library an excellent way to access WordNet. Maven bundle of WN files and Dictionary.getDefaultResourceInstance() make access very simple. Now I am trying to explore a database backed dictionary. What is the recommended way to populate the MySQL database with WordNet data? Regards, Vinod