Entator class - Annotate name entities in text inline within your Jupyter notebook in Python.
In a data science or machine learning project, you may prepare and study text with name entities within a Jupyter notebook then need to annotate the data to augment the training or fix errors in your source data.
Since you are already working within a Jupyter notebook, the Entator works inline allowing you to interact with your data and annotate it quickly and easily, syncing straight back to your input data arrays or matrices.
Within Jupyter, you can easily home in on problem input data - perhaps only misclassified entity - so you can step through and adjust token type just for those items.
The Entator widget is designed with a flexible API making it quick and easy to get started exploring your dataset, guessing how to work with your data without explicit configuration where possible.
The project is currently in ALPHA development phase, and I appreciate all feedback on any problems including details on how the current code works or fails to work for the structure of your particular projects.
You can easily combine Entator's interactive components to suit your project. Here are some examples.
Then set up Entator to display buttons for each label and each word in the text, click on button to change the label.
from nertk import Entator
annotator = Entator(labels=['other','person','location'],
inputs=[['John','is','going','to','Germany','tomorrow','.']])
annotator.run()
#get annotation
annotator.targets
from nertk import Entator
annotator = Entator(labels=['other','person','location'],
inputs=[['John','is','going','to','Germany','tomorrow','.']],
targets=[['person', 'other', 'other', 'other', 'location', 'other', 'other']])
annotator.run()
#get annotation
annotator.targets
pip install nertk
Please get in touch with any feedback or questions: Linkedin. It will be especially useful to understand the structure of your project and what is needed for your data annotation - e.g. extra entity types. There are many ideas on the roadmap, and your input is vital for prioritising these.
This code is released under an MIT license.