!7 p-exp { for (Pair p : ll( pair("I called my mother", "I called my brother"), pair("It's time for tea", "What time is it"))) { print("\n" + p); PTElement tree1 = ai_parseBottomUpToTree(p.a); PTElement tree2 = ai_parseBottomUpToTree(p.b); L> matches = ai_matchParseTrees_v2(tree1, tree2); //pnl(flattenListOfPairs(matches)); // Quick&Dirty matching using PTElement/WeightedProduction.toString() matches = dropPairsWithSameToStringOnBothSidesIC(matches); //print("\nSimplified."); pnl(map(func(O o) -> S { O oo = o instanceof Pair ? second(o/Pair) : o; ret oo instanceof PTElement ? str(o) + " (depth=" + ptElement_depth(oo/PTElement) + ")" : str(o); }, flattenListOfPairs(matches))); } }