Streamlit component for text highlighting
Project description
Text Highlighter
A Streamlit component for annotating text using text highlighting. Useful for NLP tasks.
Installation
You can install the Text Highlighter package using the following command:
pip install --upgrade text-highlighter
Usage
The package can be used as follows:
from text_highlighter import text_highlighter
import streamlit as st
# Basic usage
result = text_highlighter(
text="Cats and dogs in the Netherlands are awesome!", labels=[
("ANIMAL", "red"),
("LOCATION", "green")
]
)
# Show the results
st.write(result)
In the example.py
script you can find the above example. You can run the example as follows:
streamlit run example.py
The output will look like this:
Contribute
Feel free to add a pull request or open an issue if you have any questions or suggestions.
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
text-highlighter-0.0.9.tar.gz
(544.7 kB
view hashes)
Built Distribution
Close
Hashes for text_highlighter-0.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4a5bb33eb5a6e832e9f05e443da16df5770767fd77dc89bda6fa5bba46fbccb |
|
MD5 | e3ee1dbfd48636540de5a41d90a7b0d6 |
|
BLAKE2b-256 | 41ea776151c3b1f63c84726bd904e3035d8a7300ce3fc4531378c4788ecbec30 |