static void ai_spec_moveToMiddle_triple(S term) { T3 t = ai_parseTriple(term); if (t != null) ai_spec_moveToMiddle_triple(term, t, ai_spec_moveToMiddle_mtmRels()); } static void ai_spec_moveToMiddle_triple(S term, T3 t, L mtmRels) { if (t == null) ret; S rel = t.b, b = t.c; for (WebRelation mtm : mtmRels) { L l = splitAtSlash_keepAll(web_text(mtm.a)); L lReplacement = splitAtSlash_keepAll(web_text(mtm.b)); //print("Trying " + sfu(l) + " -> " + sfu(lReplacement) + " on " + rel + " / " + b); continue unless l(l) == 2 && l(lReplacement) == 2; new Matches m; S prefix = second(l) + " "; continue unless eqic(first(l), rel) && swic(b, prefix, m); //print("Match."); ai_postTriple(term, "is identical to", ai_renderTriple(t.a, first(lReplacement), second(lReplacement) + " " + m.rest())); } }