javanlpwordnetjaws-wordnetsenti-wordnet

WordNet does not have a definition for the word 'for'


I'm using WordNet 3 to validate English words, but it does not have a definition for the word for.

Code snippet:

System.setProperty("wordnet.database.dir", modelFolder); // path to WordNet

NounSynset nounSynset;
NounSynset[] hyponyms;

WordNetDatabase database = WordNetDatabase.getFileInstance();
Synset[] synsets = database.getSynsets(word); // no results

boolean isFound = synsets.length > 0;

Solution

  • WordNet is about semantics, i.e. the meaning of words, so it doesn't contain words that have no meaning but only a grammatical function. These are also called function words.

    Source: http://www.d.umn.edu/~tpederse/Group01/WordNet/wordnet-stoplist.html