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 a = t.a, rel = t.b; for (WebRelation mtm : mtmRels) { L l = splitAtSlash_keepAll(t.a); L lReplacement = splitAtSlash_keepAll(t.c); //print("Trying " + sfu(l) + " -> " + sfu(lReplacement) + " on " + rel + " / " + b); ret unless l(l) == 2 && l(lReplacement) == 2; new Matches m; S prefix = second(l) + " "; ret unless eqic(first(l), rel) && swic(b, prefix, m); //print("Match."); //ai_postTriple(t.a, first(lReplacement), second(lReplacement) + " " + m.rest()); ai_postTriple(term, "is identical to", ai_renderTriple(t.a, first(lReplacement), second(lReplacement) + " " + m.rest())); } }