google / google/langextract

Clickable Entity Selector in Visualizations

Open
#103 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
38.6k
Forks
2.7k
Avg merge
3d 15h
Merged PRs (30d)
3

Description

For your consideration, a couple of minor changes to the visualization compiler enabled clickable entity selection, which i found alot faster to review on a longer document:

```
<<<<<<< SEARCH
:start_line:78
-------
.lx-highlight { position: relative; border-radius:3px; padding:1px 2px;}
=======
.lx-highlight { position: relative; border-radius:3px; padding:1px 2px; cursor: pointer;}
>>>>>>> REPLACE
<<<<<<< SEARCH
:start_line:545
-------
window.jumpToExtraction = jumpToExtraction;

updateDisplay();
}})();
=======
window.jumpToExtraction = jumpToExtraction;

document.getElementById('textWindow').addEventListener('click', (event) => {{
const span = event.target.closest('.lx-highlight');
if (span && span.dataset.idx) {{
jumpToExtraction(span.dataset.idx);
}}
}});

updateDisplay();
}})();
>>>>>>> REPLACE
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.