# Streamlit Annotator
<table>
<tr>
<td>
**Download the package from PyPI:**
[](https://badge.fury.io/py/st-annotator)
</td>
<td>
**Try the demo on Streamlit Cloud:**
[](https://st-annotator.streamlit.app)
</td>
</tr>
</table>
# 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
```
Raw data
{
"_id": null,
"home_page": null,
"name": "st-annotator",
"maintainer": null,
"docs_url": null,
"requires_python": "!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*,>=3.8",
"maintainer_email": null,
"keywords": "streamlit, text, annotation, nlp, argument mining, annotator",
"author": "Ettore Caputo",
"author_email": "ettore.caputo27@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/90/89/22d7cd4c4cdd07fc5f269cd84ae9fa6936104905fb5a24a9ff3ab987e17c/st_annotator-0.1.0.tar.gz",
"platform": null,
"description": "\n# Streamlit Annotator\n<table>\n<tr>\n<td>\n\n**Download the package from PyPI:**\n\n[](https://badge.fury.io/py/st-annotator)\n\n\n\n</td>\n<td>\n\n**Try the demo on Streamlit Cloud:**\n\n[](https://st-annotator.streamlit.app)\n\n</td>\n</tr>\n</table>\n\n# Install with pip\n\n```\npip install st-annotator\n```\n\nst-annotator is a Streamlit component usefull to annotate text, expecially for NLP and Argument Mining purposes.\nBased on the original project [Streamlit Annotation Tools](https://github.com/streamlit/annotation-tools) of [rmarquet21](https://github.com/rmarquet21).\n\n\n\n\n### Features:\n- \ud83d\udccd Smart positioning that stays within screen bounds\n- \ud83d\udcca Shows text content, label category, position, and all custom metadata\n- \ud83c\udfa8 Matches your custom color scheme\n- \u26a1 Instant display on hover, disappears on mouse leave\n- \ud83d\udd27 Supports strings, numbers, booleans, lists, and objects\n\n### New Features\n- Key parameter to text_annotator function\n- A special button to show all the annotations together\n- **\ud83c\udd95 Hover Popup with Metadata**: Hover over annotations to see detailed information including custom metadata\n\n\n\n\n### Metadata Support\nYou can now add custom metadata to each annotation that will appear in a hover popup:\n\n```python\nlabels = {\n \"Sentiment\": [\n {\n \"start\": 0,\n \"end\": 20,\n \"label\": \"This is amazing!\",\n \"metadata\": {\n \"confidence\": 0.95,\n \"emotion\": \"Joy\",\n \"intensity\": \"High\",\n \"source\": \"Customer feedback\"\n }\n }\n ]\n}\n```\n\n# Quick Start\n\nRun the example.py file:\n\n```\nstreamlit run examples/example.py\n```\n\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Component for annotating text for Argument Mining and NLP resolution",
"version": "0.1.0",
"project_urls": null,
"split_keywords": [
"streamlit",
" text",
" annotation",
" nlp",
" argument mining",
" annotator"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "9c560d5d3dccba7baddb8d403d9594347216b8f8f90808dd13a28ce77dc7f50f",
"md5": "a698158b60d9a3a0d483a96bef94b8eb",
"sha256": "ac78443264f5aa755503d9b3314860d5a0a210b8e293dff601a719f31146c232"
},
"downloads": -1,
"filename": "st_annotator-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a698158b60d9a3a0d483a96bef94b8eb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*,>=3.8",
"size": 439319,
"upload_time": "2025-07-16T12:47:57",
"upload_time_iso_8601": "2025-07-16T12:47:57.899082Z",
"url": "https://files.pythonhosted.org/packages/9c/56/0d5d3dccba7baddb8d403d9594347216b8f8f90808dd13a28ce77dc7f50f/st_annotator-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "908922d7cd4c4cdd07fc5f269cd84ae9fa6936104905fb5a24a9ff3ab987e17c",
"md5": "1a5f43ac0ad4afb12968d2bd4f6a2392",
"sha256": "5e049959e0e0c480f12fe3163e26cf72484ba1a699365717043ccddf14bb76c1"
},
"downloads": -1,
"filename": "st_annotator-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "1a5f43ac0ad4afb12968d2bd4f6a2392",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*,>=3.8",
"size": 429644,
"upload_time": "2025-07-16T12:48:00",
"upload_time_iso_8601": "2025-07-16T12:48:00.382630Z",
"url": "https://files.pythonhosted.org/packages/90/89/22d7cd4c4cdd07fc5f269cd84ae9fa6936104905fb5a24a9ff3ab987e17c/st_annotator-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-16 12:48:00",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "st-annotator"
}