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

31
LINES

< > BotCompany Repo | #1010444 // Diagram About Snippet [dev.]

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

Download Jar. Libraryless. Click here for Pure Java version (15149L/109K).

1  
!7
2  
3  
sS knowledge = [[
4  
  CirclesAndLines(circles=[Circle(text="A snippet", traits=[], x=d("0.33"), y=d("0.44")), Circle(text="a type", traits=[], x=d("0.7"), y=d("0.43"))], lines=[Arrow(a=t5, b=t31, text="has", traits=[])], title="A snippet")
5  
  CirclesAndLines(circles=[Circle(text="A snippet", traits=[], x=d("0.32"), y=d("0.3")), Circle(text="55", traits=[], x=d("0.67"), y=d("0.31")), Circle(text="a program", traits=[], x=d("0.52"), y=d("0.59"))], lines=[Arrow(a=t5, b=t31, text="with type", traits=[]), Arrow(a=t5, b=t57, text="Then: is", traits=[])], title="Snippet type 55, clarified")
6  
]];
7  
8  
p {
9  
  L<Web> knol = websFromCALStructures(knowledge);
10  
  Web web = webFromTriples(#1010443, "is a", "snippet");
11  
  web_isA_expandForward(web);
12  
  web_addWebToWeb(first(knol), web);
13  
  web_mergeNodesByFirstLabelIC(web);
14  
  web_rename(web, "a type", "type ?");
15  
  web_collapseBackwards_keep(web, "is");
16  
  for (WebRelation rel : web_findRelations(web, "*", "has", "type ?"))
17  
    if (isSnippetID(web_text(rel.a)))
18  
      web_setText(rel.b, "type " + getSnippetType(web_text(rel.a)));
19  
  web_contractRelation(web, "has", "type");
20  
  
21  
  web_is_addToSource(web);
22  
  
23  
  Clusters<S> clusters = new HashMap;
24  
  treeSetClusters_add(clusters, "has type", "with type");
25  
  web_clusterClean(web, clusters);
26  
  
27  
  Web patternWeb = web_clusterClean(second(knol), clusters);
28  
  web_ifThen2(web, patternWeb);
29  
30  
  showTabbedWebs("Pattern", patternWeb, "Input", web);
31  
}

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: #1010444
Snippet name: Diagram About Snippet [dev.]
Eternal ID of this version: #1010444/21
Text MD5: 1824e904ac705d0c5f58f4d79d185873
Transpilation MD5: e7139ae2f6998a9dab45deb06f76c1ae
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-09-18 03:21:40
Source code size: 1461 bytes / 31 lines
Pitched / IR pitched: No / No
Views / Downloads: 636 / 1246
Version history: 20 change(s)
Referenced in: [show references]