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); ret 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 IndexedWikiPage(realTitle, text); } }; }