static L webs_readTripleFile(File f) { // parallel isn't even faster //if (hasMultipleCores()) ret webs_readTripleFile_parallel(f); if (!f.exists()) ret ll(); Iterator it = linesFromFile(f); //L names = (L) unstructure(it.next()); new L names; while (it.hasNext()) { S s = trim(it.next()); if (empty(s)) break; names.add(unquote(s)); } new L webs; while (it.hasNext()) { S s = it.next(); pcall { addIfNotNull(webs, webs_readTripleFile_line(s, names)); } } ret webs; } static Web webs_readTripleFile_line(S s, L names) { // S moreInfo = quote(unnull(web.globalID)) + " " + quote(unnull(web.title)) + " " + quote(unnull(web.source)) + " " + (web.unverified ? "u" : "v") + " " + web.created; L l = javaTokC(s); if (l(l) == 8) { Web web = webFromTriple( names.get(parseInt(first(l))), names.get(parseInt(second(l))), names.get(parseInt(third(l)))); web.globalID = unquote(l.get(3)); web.title = unquote(l.get(4)); web.source = unquote(l.get(5)); web.unverified = !eq(l.get(6), "v"); web.created = parseLong(l.get(7)); ret web_intern(web); } null; }