sclass WikiPage { S title, text; *() {} *(S *title, S *text) {} } static IterableIterator streamInSimpleWikipedia() { File f = unpackSimpleWikipedia(); final BufferedReader reader = utf8bufferedReader(f); please include function iteratorFromFunction. ret main. iteratorFromFunction(new O { int lines = 0, pages = 0; StringBuilder pageBuf = null; WikiPage get() ctex { S line; while ((line = reader.readLine()) != null) { line = trim(line); if (eq(line, "")) pageBuf = new StringBuilder; if (pageBuf != null) pageBuf.append(line).append("\n"); if (eq(line, "")) { L tok = htmlTok(str(pageBuf)); S title = trim(htmldecode(join(contentsOfContainerTag(tok, "title")))); S text = trim(htmldecode(join(contentsOfContainerTag(tok, "text")))); if ((++pages % 1000) == 0) { fractionDone(pages/228400.0); print("Pages: " + pages + " (" + title + ")"); sleep(1); } ret new WikiPage(title, text); } } fractionDone(1); reader.close(); null; } }); }