Uses 911K of libraries. Click here for Pure Java version (5197L/26K).
| 1 | !7 | 
| 2 | |
| 3 | cmodule AgiBlueDeduction > DynPrintLogAndEnabled {
 | 
| 4 |   start {
 | 
| 5 |     dm_vmBus_onMessage_q('agiBlue_servingConceptPage, voidfunc(virtual Request request, virtual Page page) {
 | 
| 6 | if (!enabled) ret; | 
| 7 | Cl<virtual Entry> usesAsKey = cast getOpt usesAsKey(request); | 
| 8 | if (empty(usesAsKey)) ret; | 
| 9 | S q = getString q(page); | 
| 10 | LPairS pairs = map(usesAsKey, e -> pair((S) rcall q(e), getString value(e))); | 
| 11 | MultiSet<F1S> ms = ai_deduceReplaceSuffixMultiSet(pairs); | 
| 12 | print(q + ": " + pairs); | 
| 13 | print(multiSetToLines(ms)); | 
| 14 | F1 winner = ms.getMostPopularEntry(); | 
| 15 | int score = ms.get(winner); | 
| 16 | if (score >= 2) | 
| 17 | rcall quickPost(page, "transformation function (+" + score + ")", struct(winner)); | 
| 18 | }); | 
| 19 | } | 
| 20 | } | 
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1024372 | 
| Snippet name: | agi.blue Deduction Module [dev.] | 
| Eternal ID of this version: | #1024372/11 | 
| Text MD5: | 90e122cdb1dfe8612c3d55e7abb223bb | 
| Transpilation MD5: | 2af0908873868eb431329e6554dfab95 | 
| Author: | stefan | 
| Category: | javax / agi.blue | 
| Type: | JavaX source code (Dynamic Module) | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2019-08-07 12:36:38 | 
| Source code size: | 773 bytes / 20 lines | 
| Pitched / IR pitched: | No / No | 
| Views / Downloads: | 447 / 1912 | 
| Version history: | 10 change(s) | 
| Referenced in: | [show references] |