static L webs_readTripleFile(InputStream in) { try { Iterator it = linesFromInputStream(in); L names = (L) unstructure(it.next()); new L webs; while (it.hasNext()) { S s = it.next(); pcall { L l = splitAtSpace(s); if (l(l) == 3) webs.add(webFromTriple( names.get(parseInt(first(l))), names.get(parseInt(second(l))), names.get(parseInt(last(l))))); } } } finally { in.close(); } ret webs; }