Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

13
LINES

< > BotCompany Repo | #1020570 // ai_verbalizeAnalysisMap

JavaX fragment (include)

sS ai_verbalizeAnalysisMap(Map<O, Set<S>> map) {
  if (map == null) null;
  if (empty(map)) ret "Map empty";
  if (l(map) == 1) ret "Only a single feature value (" + firstKey(map) + ")";
  bool disjoint = allSetsDisjoint(values(map));
  if (allSetsAreSingletons(values(map)))
    ret "Feature success! " + sfu(mapValues(f first, map));
  new Map<O, S> singletons;
  for (O key, Set<S> value : map) { if (l(value) == 1) singletons.put(key, first(value)); }
  if (nempty(singletons)) ret "Clear feature values: " + sfu(singletons);
  if (disjoint) ret "No feature overlap";
  ret "Feature results inconclusive";
}

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: 246 / 311
Version history: 9 change(s)
Referenced in: [show references]