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.0.3.tar.gz (429.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.0.3-py3-none-any.whl (439.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: st_annotator-0.0.3.tar.gz
  • Upload date:
  • Size: 429.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for st_annotator-0.0.3.tar.gz
Algorithm Hash digest
SHA256 5c893c8aff50d2a81da79808e5777db1eca13f5075e37dea944e93deb4955d4d
MD5 2a990b2d0aff897b1223f8bfb6edf710
BLAKE2b-256 31bb879f4880bbeda59329ee6c013ce8b1a8e826a35862a4cd3a06b82b288047

See more details on using hashes here.

File details

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

File metadata

  • Download URL: st_annotator-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 439.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for st_annotator-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 eb58c37961e2f75d420314e039cf84bfd8978de6d00aec55e77af74e9d672a31
MD5 548d5ac7c21dc6601d85e25bcc5a4fce
BLAKE2b-256 447ec3715a91b8df58d907091e7521bd7e277bead3817917d32f09f0c10444d2

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