Git Product home page Git Product logo

st_ner_annotate's Introduction

Streamlit Named Entity Recognition (NER) Annotation component

This is a component to assist with the annotation of named entities in an unstructured piece of text. The concept for this is borrowed from what is offered by Prodi.gy. This code is derived from the work done by andfalino in his excellent streamlit-named-entity-svelte repository.

The functionality has been expanded to allow for selecting of new entities and uses the streamlit-component-svelte-template.

I am also using this component as a testbed to get familiar with streamlit custom components and svelte.

NOTE This is a work in progress

Development

  • Backend
    • Install Poetry
    • Run poetry intall
    • Drop into a virtualenv shell poetry shell
    • Install a spacy model python -m spacy download en_core_web_sm
    • Edit st_ner_annotate/__init__.py change _RELEASE to False
    • Run streamlit run st_ner_annotate/__init__.py
  • Frontend
    • cd st_codemirror_diff/frontend
    • npm install
    • npm start
  • Now the frontend and backend should be up, the page can be accessed at http://localhost:8501

Development - Release

  • Frontend
    • Run npm run build in st_ner_annotate/frontend
  • Backend
    • Edit st_ner_annotate/__init__.py change _RELEASE to True
    • Drop into python virtualenv by running poetry shell
    • Build python dist wheels python setup.py sdist bdist_wheel
    • This will create the python st_ner_annotate-<version>-py3-none-any.whl in the dist dir
    • Now install this via python -m pip install <path-to-st_ner_annotate.whl>

Demo

Streamlit NER Annotate Demo GIF

References

  1. Prodi.gy
  2. streamlit-named-entity-svelte
  3. streamlit-component-svelte-template
  4. Text sample in demo taken from wiki entry on Manhattan

st_ner_annotate's People

Contributors

prasadchandan avatar sc0eur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

st_ner_annotate's Issues

Issues with newline characterr

Hi, I'm not able to add line breaks between lines? e.g.

line1 \n\nl line2

get rendered as

line1 line2

If I look at the htlm being formed I can also see that the newline characters have been removed. Any thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.