https://github.com/ettorecaputo/streamlit-annotator
st-annotator is a Streamlit component usefull to annotate text, expecially for NLP and Argument Mining purposes.
https://github.com/ettorecaputo/streamlit-annotator
annotator argument mining nlp streamlit streamlit-components
Last synced: 28 days ago
JSON representation
st-annotator is a Streamlit component usefull to annotate text, expecially for NLP and Argument Mining purposes.
- Host: GitHub
- URL: https://github.com/ettorecaputo/streamlit-annotator
- Owner: EttoreCaputo
- License: mit
- Created: 2025-06-26T15:01:22.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-06-26T22:06:53.000Z (11 months ago)
- Last Synced: 2025-06-26T23:17:29.725Z (11 months ago)
- Topics: annotator, argument, mining, nlp, streamlit, streamlit-components
- Language: TypeScript
- Homepage: https://pypi.org/project/st-annotator/
- Size: 4 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Streamlit Annotator
**Download the package from PyPI:**
[](https://badge.fury.io/py/st-annotator)
**Try the demo on Streamlit Cloud:**
[](https://st-annotator.streamlit.app)
# Install with pip
```
pip install st-annotator
```
st-annotator is a Streamlit component usefull to annotate text, expecially for NLP and Argument Mining purposes.
Based on the original project [Streamlit Annotation Tools](https://github.com/streamlit/annotation-tools) of [rmarquet21](https://github.com/rmarquet21).

### Features:
- 📍 Smart positioning that stays within screen bounds
- 📊 Shows text content, label category, position, and all custom metadata
- 🎨 Matches your custom color scheme
- ⚡ Instant display on hover, disappears on mouse leave
- 🔧 Supports strings, numbers, booleans, lists, and objects
### New Features
- Key parameter to text_annotator function
- A special button to show all the annotations together
- **🆕 Hover Popup with Metadata**: Hover over annotations to see detailed information including custom metadata
### Metadata Support
You can now add custom metadata to each annotation that will appear in a hover popup:
```python
labels = {
"Sentiment": [
{
"start": 0,
"end": 20,
"label": "This is amazing!",
"metadata": {
"confidence": 0.95,
"emotion": "Joy",
"intensity": "High",
"source": "Customer feedback"
}
}
]
}
```
# Quick Start
Run the example.py file:
```
streamlit run examples/example.py
```