# New component: NLP annotation tools

**URL:** <https://discuss.streamlit.io/t/new-component-nlp-annotation-tools/57047>\
**Category:** Custom Components\
**Tags:** components, nlp\
**Created:** [December 8, 2023, 8:35am UTC](https://discuss.streamlit.io/t/new-component-nlp-annotation-tools/57047 "2023-12-08T08:35:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmarquet21](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/rmarquet21/32/26268_2.png) [@rmarquet21](https://discuss.streamlit.io/u/rmarquet21)\
**Post date:** [December 8, 2023, 8:35am UTC](https://discuss.streamlit.io/t/new-component-nlp-annotation-tools/57047/1 "2023-12-08T08:35:24Z")

</div>

🌟👋 Hello everyone! 👋🌟

I’m excited to share some updates to my text highlighting and labeling component! 🚀 This tool is your go-to resource for easy and efficient annotation. I plan to improve it and add new components in the future.

🔗 Check it out:

- GitHub (Don’t forget to ⭐ the repo to support!): [link](https://github.com/rmarquet21/streamlit-annotation-tools)
- PyPI: [link](https://pypi.org/project/streamlit-annotation-tools)
- Live Demo: [link](https://annotation-tools.streamlit.app)

🛠 Here’s what you can do with these tools:

- **Highlighting Tools** : Make your text stand out! 🖍 See how it works:

- **Labeling Tools** : Organize and categorize with ease! 🏷

⭐ Your stars on GitHub are much appreciated! They help keep the project growing. 🌱

💻 **Easy Installation** :

```curl
pip install streamlit-annotation-tools

```

🙌 I’m open to ideas !

---

<div class="post-metadata">

**Author:** ![Sai\_SaiGraph](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/sai_saigraph/32/28739_2.png) [@Sai\_SaiGraph](https://discuss.streamlit.io/u/Sai_SaiGraph)\
**Post date:** [December 9, 2023, 5:26am UTC](https://discuss.streamlit.io/t/new-component-nlp-annotation-tools/57047/2 "2023-12-09T05:26:04Z")

</div>

please try to add drag and drop functionality:

Q. ChatGPT is a … developed by … and launched on November 30, 2022. Based on a … , it enables users to refine and steer a conversation towards a desired length, format, style, level of detail,

Answers:  
a. chatbot  
b. OpenAI  
c. large language model

The use can drag and drop the answers to the Question section…  
Hope it makes sense.  
Thanks  
Sai

---

<div class="post-metadata">

**Author:** ![rmarquet21](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/rmarquet21/32/26268_2.png) [@rmarquet21](https://discuss.streamlit.io/u/rmarquet21)\
**Post date:** [December 9, 2023, 1:05pm UTC](https://discuss.streamlit.io/t/new-component-nlp-annotation-tools/57047/3 "2023-12-09T13:05:17Z")

</div>

Thanks for the idea, but could you give me more details on the use case of this component for text annotation?

---

<div class="post-metadata">

**Author:** ![Sai\_SaiGraph](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/sai_saigraph/32/28739_2.png) [@Sai\_SaiGraph](https://discuss.streamlit.io/u/Sai_SaiGraph)\
**Post date:** [December 10, 2023, 8:13am UTC](https://discuss.streamlit.io/t/new-component-nlp-annotation-tools/57047/4 "2023-12-10T08:13:52Z")

</div>

Like a quiz app where we can drag the answers to the fill in blank spaces.

---

<div class="post-metadata">

**Author:** ![asehmi](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/asehmi/32/1771_2.png) [@asehmi](https://discuss.streamlit.io/u/asehmi)\
**Post date:** [December 14, 2023, 2:05pm UTC](https://discuss.streamlit.io/t/new-component-nlp-annotation-tools/57047/5 "2023-12-14T14:05:04Z")

</div>

Nice - would be great if you can support import and export of annotations, and stepping through annotations. Also good if the annotation format worked with a tool like spaCy, and also to allow annotations to be run iteratively over multiple sessions. Some sort of evaluation/training mode would be great, where the annotations can be supplied by an external model (essentially a variation of the import + stepping through).

---

<div class="post-metadata">

**Author:** ![rmarquet21](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/rmarquet21/32/26268_2.png) [@rmarquet21](https://discuss.streamlit.io/u/rmarquet21)\
**Post date:** [December 28, 2023, 9:15am UTC](https://discuss.streamlit.io/t/new-component-nlp-annotation-tools/57047/6 "2023-12-28T09:15:47Z")

</div>

Thank you for your feedback !

For the annotation import and export part, this is already the case, but it’s true that I forgot to document it, but it’s still possible to find the implementation on the GitHub repo in [examples](https://github.com/rmarquet21/streamlit-annotation-tools/blob/master/examples/example.py).

```python
    text = "Lorem ipsum dolor sit et amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."

    highlights = [
        [
            {"start": 0, "end": 5, "label": "Lorem"},
            {"start": 12, "end": 17, "label": "dolor"},
        ],
        [
            {"start": 6, "end": 11, "label": "ipsum"},
            {"start": 18, "end": 21, "label": "sit"},
        ],
    ]

    highlights = text_highlighter(text, highlights)

```

As for the rest, I’ll have to read up on spacy to learn more first.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/streamlit/original/3X/c/f/cf4c2ee0d938358f82448c5fe4b9c3c91d7ce19c.svg) [@system](https://discuss.streamlit.io/u/system)\
**Post date:** [June 25, 2024, 9:15am UTC](https://discuss.streamlit.io/t/new-component-nlp-annotation-tools/57047/7 "2024-06-25T09:15:57Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
