Component for annotating text for NLP resolution
Project description
streamlit-annotation
Streamlit Text Annotator
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
Release history Release notifications | RSS feed
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.3.tar.gz
(916.2 kB
view details)
Built Distribution
File details
Details for the file st_text_annotator-0.3.3.tar.gz
.
File metadata
- Download URL: st_text_annotator-0.3.3.tar.gz
- Upload date:
- Size: 916.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.10.11 Darwin/22.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5af96ce000a02e5650c308761914f2b7966ee5f00999722d49d132494cff00b |
|
MD5 | 62967773a7420a8b0722c5da9c5639e5 |
|
BLAKE2b-256 | bd447e6d8f282f70f73bb6505e0bfbdd85f9b37775f18c179d68bf802d48a90e |
Provenance
File details
Details for the file st_text_annotator-0.3.3-py3-none-any.whl
.
File metadata
- Download URL: st_text_annotator-0.3.3-py3-none-any.whl
- Upload date:
- Size: 929.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.10.11 Darwin/22.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb9ecfa7e49f9df5975fffe4953b323f28dd085746f2d2558541cdeac859f2bb |
|
MD5 | 5e867cd0bfb25149e168cd2251bf6cf5 |
|
BLAKE2b-256 | 2cd84dd61abc9762f480162cb72dc9342df72bf1e4056358129522e77854aef3 |