Warning: session_start(): open(/var/lib/php/sessions/sess_j1n4it74fumc2mep52dr2k30eq, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
static L webs_readTripleFileAsTriples(File f) {
if (hasMultipleCores()) ret webs_readTripleFileAsTriples_parallel(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(intern(unquote(s)));
}
new L triples;
while (it.hasNext()) {
S s = it.next();
pcall {
addIfNotNull(triples, webs_readTripleFileAsTriple_line(s, names));
}
}
ret triples;
}
static TripleWeb webs_readTripleFileAsTriple_line(S s, L names) {
L l = javaTokC(s);
if (l(l) == 8) {
new TripleWeb t;
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.source = intern(unquote(l.get(5)));
t.flags = eq(l.get(6), "v") ? 0 : TripleWeb.UNVERIFIED;
t.created = parseLong(l.get(7));
ret t;
}
null;
}