WordNetResource extends AbstractResource { @Override public Entity getMostFrequentEntity(String lexeme) throws LexicalSemanticResourceException { for (PoS pos : PoS.values()) { Entity e = WordNetUtils.getMostFrequentEntity(dict, lexeme, pos, isCaseSensitive); if (e != null) { return e; } } return null; } WordNetResource();  WordNetResource(String wordNetPropertiesFile); @Override boolean containsLexeme(String lexeme); @Override boolean containsEntity(Entity entity); @Override Set<Entity> getEntity(String lexeme); @Override Set<Entity> getEntity(String lexeme, PoS pos); @Override Set<Entity> getEntity(String lexeme, PoS pos, String sense); Set<Entity> getEntity(String lexeme, PoS pos, int sense); @Override Set<Entity> getParents(Entity entity); @Override int getNumberOfEntities(); @Override Iterable<Entity> getEntities(); @Override Set<Entity> getChildren(Entity entity); @Override String getResourceName(); @Override String getResourceVersion(); @Override int getShortestPathLength(Entity firstEntity, Entity secondEntity); @Override String getGloss(Entity entity); @Override Set<String> getRelatedLexemes(String lexeme, PoS pos, String sense, LexicalRelation lexicalRelation); @Override Set<Entity> getRelatedEntities(Entity entity, SemanticRelation semanticRelation); Set<Entity> getRelatedEntitiesByName(Entity entity, String semanticRelation); @Override Entity getRoot(); @Override Entity getRoot(PoS pos); @Override Entity getMostFrequentEntity(String lexeme); @Override Entity getMostFrequentEntity(String lexeme, PoS pos); Dictionary getDict();  }
@Test public void testGetMostFrequentEntity() throws Exception { wordnet.setIsCaseSensitive(false); System.out.println(wordnet.getMostFrequentEntity("car")); System.out.println(wordnet.getMostFrequentEntity("bat")); System.out.println(wordnet.getMostFrequentEntity("bank")); }