AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

wordnet synonym order
 
 

I found another problem with the wordnet distributions. All the database versions + the java and C# native apis (that access the original files) change the order of the synonyms compared to the ‘rendered’ output of wordnet. For instance, if you search for ‘january’ (or another month), the original wordnet search result will always show ‘january, jan’. The full month name is always first. But the db versions and the apis that I have tested first appear to do an alphabetic sort on the synonym list. This is annoying, cause the order has meaning. I was wondering, does your api also do this?
I’ve been trying to come up with a solution for this, but no luck yet.

 

 
  [ # 1 ]

I use JWNL and it’s returning “January, Jan” but it’s hard to tell whether this is consistently OK. Do you have other examples you want me to try?

 

 
  [ # 2 ]

For ‘dog’, the original wordnet tool gives: dog, domestic dog, canis familiaris.
I have: canis familiaris, dog, domestic dog.

It’s alphabetically.

Interesting, so the JWNL library gives the correct order. Downloading the lib now (just deleted eclipse from my pc, beeper-de-beep)
I already saw that it also has some kind of sql support. Hopefully, this is the same structure as the other database formats, otherwise, I’ll have to write some code to get this fixed.

Thanks a bunch for this.
How are you accessing this data: with a backing sql db or directly on the txt-files? How exactly did you perform the query?

 

 
  [ # 3 ]

I’m getting the right order. I’m using OpenEphyra.  It has a WordNet helper class with methods that do most things I need. My code is

public static void main(String[] argsthrows IOExceptionJWNLException {
  
if (!WordNet.initialize("res/ontologies/wordnet/file_properties.xml"))
   
System.out.println("Failed to initialize");
  
String test Arrays.toString(WordNet.getSynonyms("dog"NOUN));
  
System.out.println(test); 

The loop that retrieves the synonyms is in the OpenEphyra method, but the calls to retrieve the words are handled by JWNL.

The directory containing the wordnet files includes a bunch of files with names like “data.noun”, “index.sense”.  These are text files.

 

 
  [ # 4 ]

The directory containing the wordnet files includes a bunch of files with names like “data.noun”, “index.sense”.  These are text files.

Yep, those are the original wordnet files.

I think I’ll try to generate a temp file with the correct syn order for all the synsets using JWNL (possibly the OpenEphyra lib, if it’s needed), so that I can load this back into my system, cause I already did a bit of modifications to the wordnet db that I don’t want to loose (or do again).

Thanks.

 

 
  login or register to react