WikipediaCategoryResource extends AbstractResource { public boolean containsLexeme(String lexeme) throws LexicalSemanticResourceException { lexeme = WikipediaCategoryUtils.getCaseSensitiveLexeme(lexeme, isCaseSensitive); try { if(wiki.getCategory(lexeme) == null) { return false; } } catch (WikiApiException e) { return false; } return true; } WikipediaCategoryResource(DatabaseConfiguration dbConfig);  WikipediaCategoryResource(Wikipedia wiki);  WikipediaCategoryResource(String host, String database, String user, String password, Language language); boolean containsEntity(Entity entity); boolean containsLexeme(String lexeme); Set<Entity> getEntity(String lexeme); Set<Entity> getEntity(String lexeme, PoS pos); Set<Entity> getEntity(String lexeme, PoS pos, String sense); Set<Entity> getParents(Entity entity); int getNumberOfEntities(); Iterable<Entity> getEntities(); Set<Entity> getChildren(Entity entity); String getResourceName(); String getResourceVersion(); int getShortestPathLength(Entity firstEntity, Entity secondEntity); @Override Entity getRoot(); @Override Entity getRoot(PoS pos); String getGloss(Entity entity); Set<String> getRelatedLexemes(String lexeme, PoS pos, String sense, LexicalRelation lexicalRelation); Set<Entity> getRelatedEntities(Entity entity, SemanticRelation semanticRelation); @Override Entity getMostFrequentEntity(String lexeme); @Override Entity getMostFrequentEntity(String lexeme, PoS pos);  }
@Test public void testContainsLexeme() throws Exception { wikiResource.setIsCaseSensitive(false); assertTrue(wikiResource.containsLexeme("UKP")); assertFalse(wikiResource.containsLexeme("UKT")); assertTrue(wikiResource.containsLexeme("People_of_UKP")); assertTrue(wikiResource.containsLexeme("People of UKP")); wikiResource.setIsCaseSensitive(true); assertTrue(wikiResource.containsLexeme("UKP")); assertFalse(wikiResource.containsLexeme("UKT")); assertTrue(wikiResource.containsLexeme("People_of_UKP")); assertTrue(wikiResource.containsLexeme("People of UKP")); assertFalse(wikiResource.containsLexeme("uKP")); assertFalse(wikiResource.containsLexeme("people_of_UKP")); assertFalse(wikiResource.containsLexeme("people of UKP")); }