Has anyone written a version of term_html:term//2
that writes the term in an expandable/collapsible tree? or created javascript/css to do expansion and collapse on the existing
https://www.swi-prolog.org/pldoc/doc/SWI/library/http/term_html.pl?public_only=false
merged_lexical_segs=[ w(is,
[ ape(pos(quant)),
pos(aux),
loc(1),
ape(lnks(3)),
lnks(1),
txt("is"),
mws('is there'),
ape(link(1,topic,r(topic,seg(1,9)))),
ape(link(2,question,r(question,seg(1,9)))),
ape(link(3,query,r(query,seg(1,10)))),
link(1,'S',r('S',seg(1,10))) ]),
w(there,
[ ape(pos(quant)),
pos(ex),
loc(2),
ape(lnks(3)),
lnks(2),
txt("there"),
mws('is there'),
ape(link(1,topic,r(topic,seg(1,9)))),
ape(link(2,question,r(question,seg(1,9)))),
ape(link(3,query,r(query,seg(1,10)))),
link(1,'NP',r('NP',seg(2,2))),
link(2,'S',r('S',seg(1,10))) ]),
...