petermr / pyami

Semantic Reader of the Scientific Literature
Apache License 2.0
12 stars 9 forks source link

Feature request: embed pop-ups in enriched output HTML #22

Open EmanuelFaria opened 1 year ago

EmanuelFaria commented 1 year ago
  1. For any link to wikidata entries we've added to text, mousing over that link should trigger a pop-up window displaying the relevant comprehension-enhancing information from that entry.
  2. In the same way, whenever we have added other indicators to "comprehension-enhancing information" in the text (for example, highlighting a sentence from the source text that includes "low confidence level"), a pop-up window should display the relevant information that assists the readers comprehension, or alerts them to something that puts that information into perspective. (see example below)
  3. If the information in the pop-up window itself contains a link that could further increase the reader's comprehension, recursive pop-up windows should be triggered accordingly.

(Basic example code for generating such a pop-up is here: http://jsfiddle.net/yboss/q29tP )

Example contents of pop-up window for text highlighted in red to indicate "low confidence":


Low Confidence Level [^1]

Confidence Level: Low [^2] (highlight colour for "Low" is Red) KEY[^3]

[UNREDACTED SOURCE TEXT GOES HERE...] [^4] Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec felis metus, feugiat a ex in, tincidunt pharetra ipsum. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean porta eget lorem sit amet viverra. Quisque ac pretium justo.