Warning: session_start(): open(/var/lib/php/sessions/sess_q407o040k9uqeocbqbsk51k801, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
sS inputDiagram1 = [[CirclesAndLines(circles=[Circle(quickvis="OpenCog", text="OpenCog", x=d("0.23198847262247838"), y=d("0.3694390715667311")), Circle(text="Project", x=d("0.6628242074927954"), y=d("0.21470019342359767")), Circle(quickvis="AI", text="AI", x=d("0.7146974063400576"), y=d("0.6673114119922631"))], lines=[Arrow(a=t5, b=t30, text="is a"), Arrow(a=t30, b=t51, text="for")])]];
sS inputDiagram2 = [[CirclesAndLines(circles=[Circle(text="A project", x=d("0.2968299711815562"), y=d("0.35589941972920697")), Circle(quickvis="a human", text="a human", x=d("0.7219020172910663"), y=d("0.3578336557059961"))], lines=[Arrow(a=t5, b=t26, text="is led by")])]];
p {
Web web = webFromCALStructures(inputDiagram1, inputDiagram2);
web_upper(web);
web_isA_expandForward(web);
//web_dropArticles(web);
web_mergeNodesByFirstLabel(web);
Web web2 = cloneWeb(web);
web_collapseBackwards(web2, "is");
web_addLabelToLabelTop(web2, "a human", "who?");
// Find node with question mark and one reference node
WebNode questionNode = first(web_nodesEndingWith(web2, "?"));
WebNode reference = web_findBackwardRelated(questionNode);
web_dropAllNodesBut(questionNode, reference);
S question =
"Please tell me " + dropSuffix("?", questionNode.text())
+ " " + reference.text() + " " + web2.getRelation(reference, questionNode).text() + ".";
infoBox(question);
setFrameWidth(800, showTabbedWebs(0,
"Input 1", webFromCALStructure(inputDiagram1),
"Input 2", webFromCALStructure(inputDiagram2),
"Temporary Web", web,
"Final Web", web2,
"Generated Question", setFontSize(20, jcenteredlabel(question))));
}