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.1.tar.gz (428.3 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.1-py3-none-any.whl (437.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: st_annotator-0.1.1.tar.gz
  • Upload date:
  • Size: 428.3 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.1.1.tar.gz
Algorithm Hash digest
SHA256 436e7b795357ed88c342cd793042b810358e7e220eb8793969e02bd4f38241b5
MD5 0eb60368bdf5c4e442b8c943e779df98
BLAKE2b-256 259b42bb037f0be5ae5d4e14c06373b48728baa6a95de1fab4dfae0552b58ce9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: st_annotator-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 437.8 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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 19313024f0e8d8d20ac9ca4a9e6b40f98bf576b64df316808177aa5e31f5f878
MD5 f8e59a6d98d284d9ff91e56896bd08d6
BLAKE2b-256 978d487fab75e5aa4ee75abe1835afe0ec88315bf55027cd41a57e2a00cd3908

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