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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file tortus-1.0.2.tar.gz.

File metadata

  • Download URL: tortus-1.0.2.tar.gz
  • Upload date:
  • Size: 349.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3

File hashes

Hashes for tortus-1.0.2.tar.gz
Algorithm Hash digest
SHA256 9e52286009b5472f9912d4e1b274874d5c87902266ea8a9aa0689df115fa18b5
MD5 0552b3408c284cef731e71b9a716c247
BLAKE2b-256 4b5bd18553582e8ec00ef8b4bb5ce1a4fd4d2ab5cd55ff9061e1df0e6f3e52f5

See more details on using hashes here.

File details

Details for the file tortus-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: tortus-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 347.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3

File hashes

Hashes for tortus-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6bea7a7ecd0f8f54e6a1ff57c271ff24bf3c48cea46a578addd01804642135ed
MD5 2462e83656e16c5df83b5ace28b1b80e
BLAKE2b-256 0788bbba58a2bd6e2e0582beae9704f03c78b6913bd054e8f3d0f9c8b14322c3

See more details on using hashes here.

Supported by

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