hobama / dkpro-wsd

Automatically exported from code.google.com/p/dkpro-wsd
0 stars 0 forks source link

Some inventories in si.dictionary module don't properly implement SenseInventory #45

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The GoogleDictionaryInventory, UkbDictionaryInventory, and 
UkbDocumentDependentDictionaryInventory classes in the si.dictionary module 
claim to implement SenseInventory.  This interface requires the 
getSenseDescription() method to either return a non-null value, or to throw an 
exception.  However, these classes' getSenseDescription() methods always 
returns null.  The methods should be changed so that they do one of three 
things:

1. If the senseId it was passed is invalid, the method should throw a 
SenseInventoryException.

2. If there is no description for the sense associated with senseId, the method 
should return an empty string ("").

3. Otherwise, the method should return a human-readable description of the 
sense associated with senseId.

Nico, can you handle this one?

Original issue reported on code.google.com by tristan.miller@nothingisreal.com on 8 Nov 2013 at 5:06

GoogleCodeExporter commented 9 years ago
Yes, sure. That one is simple as these inventories do not provisde any 
description.

Original comment by nico.erbs@gmail.com on 8 Nov 2013 at 11:38

GoogleCodeExporter commented 9 years ago
Changed the corresponding classes

Original comment by nico.erbs@gmail.com on 9 Nov 2013 at 4:53

GoogleCodeExporter commented 9 years ago
Thanks.  I see the methods always return "" now.  Does this mean that every 
possible string is considered to be a valid sense ID in these inventories?

Original comment by tristan.miller@nothingisreal.com on 11 Nov 2013 at 3:23

GoogleCodeExporter commented 9 years ago
No, you're right. I changed the behauviour to return null if the sense id is 
invalid.

Original comment by nico.erbs@gmail.com on 11 Nov 2013 at 4:53