Skip to content

πŸ–ŠοΈΒ Β Annotated text

Submitted by tvst

Summary

A simple way to display annotated text in Streamlit apps

Docstring

Visit the PyPI page for more information.

Examples

example_1

def example_1():
    from annotated_text import annotated_text

    annotated_text(
        "This ",
        ("is", "verb", "#8ef"),
        " some ",
        ("annotated", "adj", "#faa"),
        ("text", "noun", "#afa"),
        " for those of ",
        ("you", "pronoun", "#fea"),
        " who ",
        ("like", "verb", "#8ef"),
        " this sort of ",
        ("thing", "noun", "#afa"),
    )
Output (beta)

example_2

def example_2():
    from annotated_text import annotated_text, annotation

    annotated_text(
        "Hello ",
        annotation("world!", "noun", color="#8ef", border="1px dashed red"),
    )
Output (beta)