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

19
LINES

< > BotCompany Repo | #1012789 // ai_deleteInvalidTriples

JavaX fragment (include)

please include function ai_invalidatedWebs.

static int ai_deleteInvalidTriples() {
  new Matches m;
  int count = 0;
  for (TripleWeb w : ai_triples("$X", "is", "invalid"))
    if (swic_trim(w.a, "Web ", m) && isGlobalID($1)) {
      S id = $1;
      
      if (eq(id, "rjncddmdgpisijjq")) print("rjncddmdgpisijjq!");
      
      TripleWeb ww = tripleIndex().getTriple(asGlobalID(id));
      if (ww != null) ++count;
      tripleIndex().removeTriple(ww);
      ai_invalidatedWebs_cache_put(asGlobalID(id), w.globalID());
    }
  if (count > 0) print("Deleted " + n2(count, "invalid triple"));
  ret count;
}

Author comment

Began life as a copy of #1012788

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: #1012789
Snippet name: ai_deleteInvalidTriples
Eternal ID of this version: #1012789/9
Text MD5: fd2cfabfaaf3d75d16f1eacaa84b0af2
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-15 00:02:46
Source code size: 627 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 493 / 492
Version history: 8 change(s)
Referenced in: [show references]