Im using MITs JWI and need to check if a given word is a noun.
Currently Im trying to do it like this
IWordID wId = stemmer.getDictionary().getIndexWord(words[i], POS.NOUN).getWordIDs().get(0);
IWord localWord = stemmer.getDictionary().getWord(wId);
if (localWord.getSynset().getType() != 1){ //This is no noun}
The String from word[id] was stemmed this way:
List<String> lemmas = stemmer.findStems(words[i], POS.NOUN);
words[i] = lemmas.get(0); //real code checks that lemmas isnt empty
But i end up with words like
are, is, be, have ...
How can i achieve a working noun check?