Skip to main content

Component for annotating text for NLP resolution

Project description

streamlit-annotation

Streamlit Text Annotator

PyPI version Downloads Downloads Downloads

Streamlit Text Annotator is a Streamlit component that allows you to annotate text.

Install

pip install st-text-annotator

Quick Use

Create an example.py file

from st_text_annotator import StTextAnnotator

text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean et hendrerit orci. Praesent auctor malesuada lobortis. Suspendisse ac elit bibendum, congue tellus vel, ornare ipsum. Mauris at tellus in turpis aliquet cursus."

StTextAnnotator(text)

Run:

streamlit run example.py

Output:

{
  "annotations": [
    [
      {
        "start": 0,
        "end": 5,
        "label": "Lorem"
      },
      {
        "start": 12,
        "end": 26,
        "label": "dolor sit amet"
      },
      {
        "start": 130,
        "end": 148,
        "label": "Curabitur lobortis"
      },
      {
        "start": 309,
        "end": 319,
        "label": "nec turpis"
      }
    ]
  ]
}

Development

Install

git clone git@github.com:rmarquet21/streamlit-text-annotator.git
cd streamlit-text-annotator
pip install -e .

Run

streamlit run example.py

License

MIT

Author

Robin Marquet

Contributors

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_text_annotator-0.3.2.tar.gz (534.7 kB view details)

Uploaded Source

Built Distribution

st_text_annotator-0.3.2-py3-none-any.whl (545.3 kB view details)

Uploaded Python 3

File details

Details for the file st_text_annotator-0.3.2.tar.gz.

File metadata

  • Download URL: st_text_annotator-0.3.2.tar.gz
  • Upload date:
  • Size: 534.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.11 Darwin/22.1.0

File hashes

Hashes for st_text_annotator-0.3.2.tar.gz
Algorithm Hash digest
SHA256 3c524895742141abda5702f7e88c31fb588df8f77b5712ee2eb7cc9040ba2bd8
MD5 69a591e4bdb86a85f420513afc3f716d
BLAKE2b-256 b048b64bf638219c797d1b515d9cb9a5472d2ab576bb3f45dc26f809af427d8e

See more details on using hashes here.

Provenance

File details

Details for the file st_text_annotator-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for st_text_annotator-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 caf85f6fa67faad7f5e4286b3e200e44f76987aaed1a1f2c82fc1fe887755e93
MD5 99f512cbbe6e02ceae6c53af2e707712
BLAKE2b-256 4d7e65e5af90cbc9d55f1aa0badc42d4e80f5f0e9b1bb4302ed949e8aa344003

See more details on using hashes here.

Provenance

Supported by

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