1 | sS ai_verbalizeAnalysisMap(Map<O, Set<S>> map) { |
2 | if (map == null) null; |
3 | if (empty(map)) ret "Map empty"; |
4 | if (l(map) == 1) ret "Only a single feature value (" + firstKey(map) + ")"; |
5 | bool disjoint = allSetsDisjoint(values(map)); |
6 | if (allSetsAreSingletons(values(map))) |
7 | ret "Feature success! " + sfu(mapValues(f first, map)); |
8 | new Map<O, S> singletons; |
9 | for (O key, Set<S> value : map) { if (l(value) == 1) singletons.put(key, first(value)); } |
10 | if (nempty(singletons)) ret "Clear feature values: " + sfu(singletons); |
11 | if (disjoint) ret "No feature overlap"; |
12 | ret "Feature results inconclusive"; |
13 | } |
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1020570 |
Snippet name: | ai_verbalizeAnalysisMap |
Eternal ID of this version: | #1020570/10 |
Text MD5: | 317de04d7967a6d6daab494b5258a717 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-12-27 02:05:49 |
Source code size: | 623 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 248 / 313 |
Version history: | 9 change(s) |
Referenced in: | [show references] |