sclass AI_SubSpace implements AI_PostHandler, AI_CacheChecker { new MultiMap index; new HashMap websByID; // existence of triple has already been checked public S postTriple(T3 t) { Web web = webFromTriple(t); websByID.put(web.globalID, web); for (WebNode node : web_nodesAndRelations(web)) for (S text : asSet(node.texts())) index.put(ai_shortenForIndex(text), node); ret web.globalID; } public bool hasTriple(S a, S b, S c) { L webs = ai_withoutInvalidWebs(nodesToWebs(shortestList3( index.get(a), index.get(b), index.get(c)))); ret webs_search_noVar_bool(webFromTriples(a, b, c), webs); } }