Download Jar. Libraryless. Click here for Pure Java version (6300L/41K).
!7 p { new Matches m; S base = "heise.de 2018/04/20 (raw)"; L<S> full = mechList(base); for (S list : mechListsPlusNumber(barCombine(base, "Similar lines"))) { L<S> l = mechList(list); int nTheory = 1; for (S s : mechList(barCombine(list, "Theories"))) { L<S> rest = listMinusSet(full, l); L<S> entries; if "all lines start with *" entries = startingWithIC(rest, $1); else if "all lines end with *" entries = endingWithIC(rest, $1); else { print("Uninterpretable theory: " + s); continue; } print("Theory " + s + ": Found " + n2(entries, "more entry", "more entries") + "/" + l(rest)); if (nempty(entries)) editMechList(barCombine(list, "Theory " + nTheory + " | More matching lines"), entries); ++nTheory; } } }
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: | 892 / 1778 | 
| Version history: | 5 change(s) | 
| Referenced in: | [show references] |