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

Uploaded Source

Built Distribution

st_text_annotator-0.3.0-py3-none-any.whl (545.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: st_text_annotator-0.3.0.tar.gz
  • Upload date:
  • Size: 534.4 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.0.tar.gz
Algorithm Hash digest
SHA256 bbc01a9808654d2c71b8f2fd013897adb356e33232df8a36f2e4e79970501f18
MD5 32627a34c400f50f2e16781fd1933c78
BLAKE2b-256 38926bd0c786554b405ea047f262f2b115012032cf3d8e91af6388614a75ed11

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for st_text_annotator-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a278347524b0c1a7a723b18fc5ff93515dfb4ef5ebe3f4eb90914996db539583
MD5 9adb4e7aeb713c2a903c88eb62465ad4
BLAKE2b-256 c081bd05c412c5d73e1495480252bfc8fcfc409888a13da42b93dd1d5b52a16e

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