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).

!7

sS knowledge = [[
  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")
  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")
]];

p {
  L<Web> knol = websFromCALStructures(knowledge);
  Web web = webFromTriples(#1010443, "is a", "snippet");
  web_isA_expandForward(web);
  web_addWebToWeb(first(knol), web);
  web_mergeNodesByFirstLabelIC(web);
  web_rename(web, "a type", "type ?");
  web_collapseBackwards_keep(web, "is");
  for (WebRelation rel : web_findRelations(web, "*", "has", "type ?"))
    if (isSnippetID(web_text(rel.a)))
      web_setText(rel.b, "type " + getSnippetType(web_text(rel.a)));
  web_contractRelation(web, "has", "type");
  
  web_is_addToSource(web);
  
  Clusters<S> clusters = new HashMap;
  treeSetClusters_add(clusters, "has type", "with type");
  web_clusterClean(web, clusters);
  
  Web patternWeb = web_clusterClean(second(knol), clusters);
  web_ifThen2(web, patternWeb);

  showTabbedWebs("Pattern", patternWeb, "Input", web);
}

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: 420 / 875
Version history: 20 change(s)
Referenced in: [show references]