python-gatenlp
python-gatenlp copied to clipboard
Enhance HTML viewer
These would be very cool to have:
- allow to limit the annotation sets / types to send over
- allow to pre-select set/type combinations for viewing
- allow to update the annotations or the document through calling some method: then sending over HTML to a notebook could already be used to show how annotations or the document changes as a process runs
- implement a change logger that does this: send annotation updates to a specific viewer with a specific ID
Added by mistake
I would add: Perform highlighting upon selection of a given annotation, To do so, a palette of softer(pastel) colors may be need
Limiting the annotation sets/types has been implemented, see parameter annspec: somedoc.show(annspec=["set1", ("set2", ["type1", "type"])]
Preselecting annotations has been implement, see parameter preselect: somedoc.show(preselect=[("set1", ["type1", "type2"])])
For a "live" viewer (and maybe support for interactive annotating) perhaps consider a mechanism similar to the one used for jupyter widgets, see https://ipywidgets.readthedocs.io/en/stable/examples/Widget%20Low%20Level.html