WikipediaArticleResource extends AbstractResource { public boolean containsLexeme(String lexeme) throws LexicalSemanticResourceException { lexeme = WikipediaArticleUtils.getCaseSensitiveLexeme(lexeme, isCaseSensitive); try { wiki.getPage(lexeme); } catch (WikiApiException e) { return false; } return true; } WikipediaArticleResource(String host, String database, String user, String password, Language language);  WikipediaArticleResource(DatabaseConfiguration dbConfig);  WikipediaArticleResource(Wikipedia wiki); 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(); Set<String> getRelatedLexemes(String lexeme, PoS pos, String sense, LexicalRelation lexicalRelation); int getShortestPathLength(Entity e1, Entity e2); String getGloss(Entity entity); Set<Entity> getRelatedEntities(Entity entity, SemanticRelation semanticRelation); @Override Entity getRoot(); @Override Entity getRoot(PoS pos); @Override Entity getMostFrequentEntity(String lexeme); @Override Entity getMostFrequentEntity(String lexeme, PoS pos);  }
@Test public void testContainsLexeme() throws LexicalSemanticResourceException { wikiResource.setIsCaseSensitive(false); assertTrue(wikiResource.containsLexeme("TK1")); assertTrue(wikiResource.containsLexeme("SIR")); assertTrue(wikiResource .containsLexeme("Semantic Information Retrieval")); assertTrue(wikiResource.containsLexeme("Unconnected page")); assertTrue(wikiResource.containsLexeme("Unconnected_page")); assertFalse(wikiResource.containsLexeme("TK4")); wikiResource.setIsCaseSensitive(true); assertTrue(wikiResource.containsLexeme("TK1")); assertFalse(wikiResource.containsLexeme("tK1")); assertTrue(wikiResource.containsLexeme("SIR")); assertTrue(wikiResource .containsLexeme("Semantic Information Retrieval")); assertFalse(wikiResource .containsLexeme("semantic Information Retrieval")); assertTrue(wikiResource.containsLexeme("Unconnected page")); assertTrue(wikiResource.containsLexeme("Unconnected_page")); assertFalse(wikiResource.containsLexeme("TK4")); }