Download Jar. Libraryless. Click here for Pure Java version (6300L/41K).
1 | !7 |
2 | |
3 | p { |
4 | new Matches m; |
5 | S base = "heise.de 2018/04/20 (raw)"; |
6 | L<S> full = mechList(base); |
7 | for (S list : mechListsPlusNumber(barCombine(base, "Similar lines"))) { |
8 | L<S> l = mechList(list); |
9 | int nTheory = 1; |
10 | for (S s : mechList(barCombine(list, "Theories"))) { |
11 | L<S> rest = listMinusSet(full, l); |
12 | L<S> entries; |
13 | if "all lines start with *" |
14 | entries = startingWithIC(rest, $1); |
15 | else if "all lines end with *" |
16 | entries = endingWithIC(rest, $1); |
17 | else { |
18 | print("Uninterpretable theory: " + s); |
19 | continue; |
20 | } |
21 | |
22 | print("Theory " + s + ": Found " + n2(entries, "more entry", "more entries") + "/" + l(rest)); |
23 | |
24 | if (nempty(entries)) |
25 | editMechList(barCombine(list, "Theory " + nTheory + " | More matching lines"), entries); |
26 | |
27 | ++nTheory; |
28 | } |
29 | } |
30 | } |
Began life as a copy of #1014385
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1014388 |
Snippet name: | Extend theories with more examples (OK) |
Eternal ID of this version: | #1014388/6 |
Text MD5: | 69217ed14a1404fd8591759cd4649c7e |
Transpilation MD5: | 36e3acb2253b5467d3a486dae98ac35e |
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-04-21 01:18:34 |
Source code size: | 887 bytes / 30 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 419 / 1060 |
Version history: | 5 change(s) |
Referenced in: | [show references] |