srecord WikiPage(S title, S text) {} static Map indexedSimpleWikipedia() { final File f = unpackSimpleWikipedia(); final Map map = ciMap(); for (IndexedWikiPage ip : indexSimpleWikipedia()) map.put(ip.title, ip); Map actualMap = new TreeMap(caseInsensitiveComparator()) { public WikiPage get(S title) { IndexedWikiPage ip = map.get(title); if (ip == null) null; L tok = htmlTok(loadTextFilePart(f, ip.start, ip.start+ip.len)); S realTitle = trim(htmldecode(join(contentsOfContainerTag(tok, "title")))); S text = trim(htmldecode(join(contentsOfContainerTag(tok, "text")))); ret WikiPage(realTitle, text); } }; for (S title : keys(map)) actualMap.put(title, null); // dummy entry to have key ret actualMap; }