Skip to main content

Component for annotating text for Argument Mining and NLP resolution

Project description

Streamlit Annotator

Download the package from PyPI:

PyPI version

Try the demo on Streamlit Cloud:

Open in Streamlit

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 of 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:

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

st_annotator-0.1.3.tar.gz (588.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

st_annotator-0.1.3-py3-none-any.whl (599.3 kB view details)

Uploaded Python 3

File details

Details for the file st_annotator-0.1.3.tar.gz.

File metadata

  • Download URL: st_annotator-0.1.3.tar.gz
  • Upload date:
  • Size: 588.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.11.8 Darwin/25.1.0

File hashes

Hashes for st_annotator-0.1.3.tar.gz
Algorithm Hash digest
SHA256 1687a6655edd2138c61bd67a08b6116260e741f75c0c463724ff67442ed48d49
MD5 4a71861121d4dd0001f1c36661ead56f
BLAKE2b-256 e2fdd2f02195df2b0069859e93b5dfe49b106f2d212264463f27f27c7aa346f7

See more details on using hashes here.

File details

Details for the file st_annotator-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: st_annotator-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 599.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.11.8 Darwin/25.1.0

File hashes

Hashes for st_annotator-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9b0b9a7f0cb6a321d9b755d5e4e367afc55fbabbbc4f3e0ff436daa9f48bb982
MD5 c0245e5510a0c29de6fa8a09e1400d22
BLAKE2b-256 d2ec8b3beaa2bae7f4e546bb8ee505db4cd8c446ea80187e24244083bc3e3966

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page