WordNetDictionary { boolean isValidWord(String input) { if (ENGLISH_STOP_WORDS_SET.contains(input.toLowerCase())) { return true; } IIndexWord idxWord; for (POS pos : POS.values()) { idxWord = dict.getIndexWord(input, pos); if (idxWord != null) { return true; } } return false; } private  WordNetDictionary(); static WordNetDictionary getInstance(); boolean isValidTerm(String input); void close();  }
@Test public void testIsValidWord() { assertTrue(wordnet.isValidWord("talent")); assertTrue(wordnet.isValidWord("postal_code")); assertTrue(wordnet.isValidWord("Of")); assertFalse(wordnet.isValidWord("foobar")); assertFalse(wordnet.isValidWord("PostalCode")); }