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

26
LINES

< > BotCompany Repo | #1012651 // Test GlobalThoughtSpace with ai_texts (OK)

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

Download Jar. Libraryless. Click here for Pure Java version (18977L/135K).

!7

p {
  ai_alternativeSmartBot();
  ai_useThoughtSpaces(true);
  
  //pnl(takeFirst(10, indexedTerms());
  MultiMap<Symbol, TripleWeb> i0 = tripleIndex().positionalIndices[0];
  print("findAIConcept = " + l(i0.get(symbol("findAIConcept")));
  print("Java = " + l(i0.get(symbol("Java")));
  pnl(takeFirst(10, keys(i0)));
  
  Symbol a = symbol("Java"), b = symbol("is"), c = symbol("$X");
  AbstractThoughtSpace ts = thoughtSpace();
  print("ThoughtSpace: " + className(ts));
  print("Java: " + l(ts.get("Java")));
  print("Java/0: " + l(ts.get("Java", 0)));
  L<TripleRef<Symbol>> l = ai_thoughtSpace_query(a, b, c, ts);
  print("Have " + l(l) + " (" + className(l) + ")");
  pnlStruct(l);
  
  L<Symbol> l2;
  assertContainsIC(pnl(l2 = ai_texts("Java", "is", "$X")), "a programming language");
  print(l(l2));
  print("OK");
}

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: #1012651
Snippet name: Test GlobalThoughtSpace with ai_texts (OK)
Eternal ID of this version: #1012651/30
Text MD5: 82233ee6a4af0d615c9c336822386465
Transpilation MD5: 65630939ce4d6b7d00250a85cf1eabee
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-10 08:14:47
Source code size: 854 bytes / 26 lines
Pitched / IR pitched: No / No
Views / Downloads: 601 / 1458
Version history: 29 change(s)
Referenced in: [show references]