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

32
LINES

< > BotCompany Repo | #1012690 // Test GlobalThoughtSpace with ai_texts & fast symbols (OK)

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

Download Jar. Libraryless. Click here for Pure Java version (19606L/140K).

1  
!7
2  
3  
unset flag SymbolAsString.
4  
//set flag symbol_debug.
5  
6  
p {
7  
  ai_alternativeSmartBot();
8  
  ai_useThoughtSpaces(true);
9  
  
10  
  pnl(takeFirst(10, indexedTerms());
11  
  MultiMap<Symbol, TripleWeb> i0 = tripleIndex().positionalIndices[0];
12  
  print("findAIConcept = " + l(i0.get(symbol("findAIConcept")));
13  
  assertTrue(i0.containsKey(symbol("Java")));
14  
  print("Java = " + l(i0.get(symbol("Java")));
15  
  pnl(takeFirst(10, keys(i0)));
16  
  
17  
  Symbol a = symbol("Java"), b = symbol("is"), c = symbol("$X");
18  
  AbstractThoughtSpace ts = thoughtSpace();
19  
  print("ThoughtSpace: " + className(ts));
20  
  print("Java: " + l(ts.get(symbol("Java"))));
21  
  print("Java/0: " + l(ts.get(symbol("Java"), 0)));
22  
  set ai_triplesToTripleRefs_lazyList_debug;
23  
  set ai_tripleToTripleRef_debug;
24  
  L<TripleRef<Symbol>> l = ai_thoughtSpace_query(a, b, c, ts);
25  
  print("Have " + l(l) + " (" + className(l) + ")");
26  
  pnlStruct(l);
27  
  
28  
  L<Symbol> l2;
29  
  assertContainsIC(pnl(l2 = ai_texts("Java", "is", "$X")), symbol("a programming language"));
30  
  print(l(l2));
31  
  print("OK");
32  
}

Author comment

Began life as a copy of #1012651

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: #1012690
Snippet name: Test GlobalThoughtSpace with ai_texts & fast symbols (OK)
Eternal ID of this version: #1012690/11
Text MD5: 8d3ca9e20a12b1f51ba69062ee3172ba
Transpilation MD5: b026b76637a323e22ac52f07dd2ad194
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 21:22:51
Source code size: 1060 bytes / 32 lines
Pitched / IR pitched: No / No
Views / Downloads: 557 / 1325
Version history: 10 change(s)
Referenced in: [show references]