#38 Error with getSenseKey()

open
nobody
None
5
2011-09-29
2011-09-29
triduc
No

Exception occurred when I was testing the each sense available in each synset. The current version of JWNL I used is 1.4.0cr2.

The case caused this exception:
Dictionary wordnet = Dictionary.getInstance();
Synset synset=wordnet.getSynsetAt(POS.ADJECTIVE, 14358);
System.out.println(synset.getWordsSize());
for (Word word:synset.getWords()){
System.out.println(word.getSenseKey());
}
//problem occured with the second sense !

Detail exception:
Exception in thread "main" java.util.NoSuchElementException
at java.util.StringTokenizer.nextToken(StringTokenizer.java:332)
at net.didion.jwnl.dictionary.FileBackedDictionary.getIndexLineWord(FileBackedDictionary.java:440)
at net.didion.jwnl.dictionary.FileBackedDictionary.getSenseKey(FileBackedDictionary.java:423)
at net.didion.jwnl.data.Word.getSenseKey(Word.java:167)

Regards

Discussion


Log in to post a comment.