Hi,
I am tring to build a Dash app showing a Table with
- a column of text fields which contain Displacy-style NER-markings for entities
- and neighboring columns displaying the found entities.
For example, the source text column would contain free text and the columns would have the extracted names, orgs, dates, etc. Here’s a scap of Displacy-like markup in a Dash app:
From stackoverflow.com/spacys-ner-output-on-a-dash-dashboard
I wanted to use the DataTable for a few reasons:
- displaying multiple rows at the same time
- dynamic (re)sizing of cells
- editable text in other columns,
- these cols have values (the NER spans) derived from the source text cell
- ability to output the (updated) columns into a new data table.
None of this seems easily doable.
Some workarounds:
- Do everything in a DataTable and use Markdown to emulate the Displacy-style markings
- This seems to be the option that i want, however, it is limited in what can be displayed;
- does HTML render in DataTable?
- i’ve just learned of this now and will try it out
- This seems to be the option that i want, however, it is limited in what can be displayed;
- display a single row at a time, selecting them with a dropdown
- drawbacks:
- only single-row is visible;
- updating the new table would be (maybe) difficult
- drawbacks:
- create a grid of Divs and Input-components, with a “Save” button, to emulate a DataTable
- drawbacks:
- many and dynamically created callbacks for updating the inputs (tedious but not impossible)
- tinkering with formatting
- drawbacks:
Does anyone have any ideas or whether any of the above is a good idea? Does anyone have any alternatives?