Download Jar. Uses 3874K of libraries. Click here for Pure Java version (10957L/80K).
1 | !7 |
2 | |
3 | p-exp {
|
4 | for (Pair<S> p : ll( |
5 | pair("I called my mother", "I called my brother"),
|
6 | pair("It's time for tea", "What time is it"))) {
|
7 | print("\n" + p);
|
8 | PTElement tree1 = ai_parseBottomUpToTree(p.a); |
9 | PTElement tree2 = ai_parseBottomUpToTree(p.b); |
10 | |
11 | L<Pair<PTElement>> matches = ai_matchParseTrees(tree1, tree2); |
12 | //pnl(flattenListOfPairs(matches)); |
13 | |
14 | // Quick&Dirty matching using PTElement.toString() |
15 | matches = dropPairsWithSameToStringOnBothSidesIC(matches); |
16 | |
17 | //print("\nSimplified.");
|
18 | pnl(flattenListOfPairs(matches)); |
19 | } |
20 | } |
Began life as a copy of #1017421
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1017425 |
| Snippet name: | Test ai_matchParseTrees |
| Eternal ID of this version: | #1017425/4 |
| Text MD5: | b1ebbff413fb0730df1189200b03b1ac |
| Transpilation MD5: | 65e6ea00517ce4fad0bbc453bad517e8 |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX source code (desktop) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-07-20 14:58:21 |
| Source code size: | 598 bytes / 20 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 700 / 1584 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |