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.1.tar.gz (916.6 kB view details)

Uploaded Source

Built Distribution

st_text_annotator-0.3.1-py3-none-any.whl (930.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: st_text_annotator-0.3.1.tar.gz
  • Upload date:
  • Size: 916.6 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.1.tar.gz
Algorithm Hash digest
SHA256 43331849ca785959d43e4e430775c50b04627b13698f36762c2dc0d3a2a08e9e
MD5 5a23cc045ec22a08f69d21dadd57b1f0
BLAKE2b-256 3eb3ae8d87acda648309ed7c3060fa674c07e0c79e71d4e1fe1c9950a08584eb

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for st_text_annotator-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aaf3a0d7833a93705ae88e72d2a80bb22b001f55053e8796a15a8390475e21ed
MD5 ceed8c5ddbcdcf805822f5d35ff35094
BLAKE2b-256 53d01c24fa17fc79dfe990120b88d54eb9794549fa72608eb429be966fa024ed

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