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

47
LINES

< > BotCompany Repo | #1012811 // Forget & Recreate v1 [recreate all "possibly related to:", OK, doesn't store anything yet]

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (19463L/138K).

!7

sbool allTerms = true;

p {
  ai_alternativeSmartBot();
  
  temp final ActualThoughtSpace ts = newThoughtSpace();
  thoughtSpaceSizePrinter();
  
  ts.blockedB = litsymbolset("possibly related to:");
  L<TripleWeb> blocked = thoughtSpace_allBlocked(ts);
  print("Blocked: " + l(blocked));
  
  Collection<S> terms;
  if (allTerms)
    terms = allFullIndexedTerms();
  else
    terms = asSet(ai_texts("$X", "possibly related to:", "$Y", ts.parent));
    
  print("Scanning " + l(terms) + " terms of approx. " + ai_indexSize() + " (" + (allTerms ? "all" : "selected") + ")");
  
  for (S term : terms) {
    ai_spec_allWords(term);
    ai_spec_apostrophS(term);
  }
    
  print("Blocked: " + l(blocked) + ", recreated: " + ts.size());
  
  new L<TripleWeb> gained;
  new L<TripleWeb> ok;
  MultiMap<T3<Symbol>, TripleWeb> _blocked = triplesByContentMap(blocked);
  for (TripleWeb w : ts.allTriples()) {
    T3<Symbol> t = new Triple<Symbol>(w);
    if (_blocked.containsKey(t)) {
      ok.add(w);
      _blocked.remove(t);
    } else
      gained.add(w);
  }
  Collection<TripleWeb> lost = values(_blocked);
  
  printFirst10WithHeading(lost, "Lost Examples");
  printFirst10WithHeading(gained, "Gained Examples");
  printFirst10WithHeading(ok, "OK Examples (" + l(ok) + ")");
  print("Same: " + l(ok) + ", lost: " + nTriple(lost) + ", gained: " + nTriple(gained));
}

Author comment

Began life as a copy of #1012724

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1012811
Snippet name: Forget & Recreate v1 [recreate all "possibly related to:", OK, doesn't store anything yet]
Eternal ID of this version: #1012811/26
Text MD5: 6ba5cabbce7e4a66eabdf65ebd7dec82
Transpilation MD5: d702488e7df46806aeabb2a7269c76b1
Author: stefan
Category: javax / a.i.
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-14 19:36:44
Source code size: 1417 bytes / 47 lines
Pitched / IR pitched: No / No
Views / Downloads: 412 / 893
Version history: 25 change(s)
Referenced in: [show references]