Skip to main content

Easy text annotation in a Jupyter Notebook

Project description

tortus logo


A python package that makes it easy to add labels to text data within a Jupyter Notebook.

Ideal use is for datasets that can be managed within a pandas dataframe. Labels are applied to the selected number of records. Timestamped annotations can be saved in a dataframe for future use in any NLP/sentiment analysis project.

Target audience

  • Data practitioners
  • Researchers
  • Students
  • Data enthusiasts

Anyone in need of a simple and intuitive product to label text data easily and efficiently will benefit from tortus.

Installation

Run the following to install:

pip install tortus
jupyter nbextension enable --py widgetsnbextension

Usage

Import the necessary modules into a Jupyter Notebook.

import pd as pandas
from tortus import Tortus

Read your dataset into a pandas dataframe.

movie_reviews = pd.read_csv('movie_reviews.csv')

Create an instance of Tortus class. You are required to enter the dataframe and the name of the column of the text to be annotated. Optional parameters include num_records, id_column, annotations, random and labels.

tortus = Tortus(movie_reviews, 'reviews', num_records=3, id_column='review_id')

Call the annotate method to begin annotations.

tortus.annotate()

At any time, annotations can be stored into an object. This can be passed to annotations if further annotations are required at a later time.

annotations = tortus.annotations

Example

tortus example

Click here to see a sample project using tortus.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tortus-1.0.2.tar.gz (349.6 kB view hashes)

Uploaded Source

Built Distribution

tortus-1.0.2-py3-none-any.whl (347.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page