static L webs_readTripleFileAsTriples(File f) { if (hasMultipleCores()) ret webs_readTripleFileAsTriples_parallel2(f); if (!f.exists()) ret ll(); Iterator it = linesFromFile(f); new L names; while (it.hasNext()) { S s = trim(it.next()); if (empty(s)) break; names.add(symbol(unquote(s))); } new L triples; while (it.hasNext()) { S s = it.next(); pcall { addIfNotNull(triples, webs_readTripleFileAsTriples_line(s, names)); } } ret triples; } static TripleWeb webs_readTripleFileAsTriples_line(S s, L names) { L l = javaTokC(s); if (l(l) == 8) { S source = intern(unquote(l.get(5))); TripleWeb t = newTripleWebWithSource(source); t.a = names.get(parseInt(l.get(0))); t.b = names.get(parseInt(l.get(1))); t.c = names.get(parseInt(l.get(2))); t.globalID(unquote(l.get(3))); // t.title = unquote(l.get(4)); // unused t.flags = eq(l.get(6), "v") ? 0 : TripleWeb.UNVERIFIED; t.created(parseLong(l.get(7))); ret t; } null; }