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.

Demo

Open in Streamlit

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

Uploaded Source

Built Distribution

st_text_annotator-0.3.4-py3-none-any.whl (412.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: st_text_annotator-0.3.4.tar.gz
  • Upload date:
  • Size: 405.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.5 Darwin/22.6.0

File hashes

Hashes for st_text_annotator-0.3.4.tar.gz
Algorithm Hash digest
SHA256 04ffa4df1cbe5a37f9a4f04fafbfa6817187335613059b31e2a7370dbeea2ec1
MD5 468bc514d93a5b8290866935ddb9078b
BLAKE2b-256 96c5025f66619a3ed090e7f1d71aa701f37582466e9c3399ed4715dc32c27810

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for st_text_annotator-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1a0e46262b4e053e4395c609a574b4438f8369ea60cf0c96c19cb4685193e93a
MD5 b8478ab92302599f1f9b6d920fd0c6b6
BLAKE2b-256 7483941f23e68833e79b1241c34d582b2143268db709cadbe9304f87012e3099

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