static S ai_html_wordThoughts(S selectedWord) {
Set ignoredWebs = ai_ignoredWebs();
L nodes = web_nodesNotFromCertainWebs(ignoredWebs, indexedNodes(selectedWord));
L rel1 = web_collectBackwardRelations(nodes);
L rel2 = web_collectForwardRelations(nodes);
//L is = ai_whatIs(selectedWord);
final new MultiMap mm;
for (WebRelation r : rel2)
mm.put(ai_textHTML(r) + " " + ai_renderNodeHTML(r.b), r.web.globalID);
for (WebRelation r : rel1)
mm.put(ai_renderNodeHTML(r.a) + " " + ai_textHTML(r) + " " + ai_textHTML(r.b), r.web.globalID);
for (WebNode n : nodes)
if (n instanceof WebRelation)
mm.put(ai_renderNodeHTML(n/WebRelation.a) + " " + ai_textHTML(n) + " " + ai_textHTML(n/WebRelation.b), n.web.globalID);
int nVirtual = ai_numberOfVirtualWebs();
ret h3(htmlencode(selectedWord))
+ ul(map html_linkURLs_targetBlank(
allToString(
map(multiMapKeysByPopularity(mm), func(S s) {
s + " [" + joinWithComma(map ai_html_linkedWeb(mm.get(s))) + "]"
})
)))
+ p(n(nodes, "node") + " out of " + ahref("http://botcompany.de:4678/", n(allIndexedWebs(), "web"))
+ (nVirtual == 0 ? "" : " + " + nVirtual + " virtual"));
}