Skip to main content

NERNA is a lightweight tool for annotating named entities directly within Python notebooks, ideal for quick and interactive NER tasks without the need for deployment or external servers.

Project description

NERNA (NER Notebook Annotation)

Follow the official repository: NER-Notebook-Annotation - GitHub

NERNA is a lightweight package designed for Named Entity Recognition (NER) annotation directly within Python notebooks.

Originally intended as a Streamlit-based interface, it has been reworked to run natively inside notebook environments (such as Jupyter, Google Colab, Databricks, etc.). This makes it easier to use without requiring deployment of web applications or cloud server contracts.

Key Features

  • ✅ Lightweight, interactive JavaScript interface embedded in notebooks
  • ✅ Compatible with local notebooks and cloud platforms (e.g., Colab, Databricks)
  • ✅ No need for external servers or deployments
  • ⚠️ Annotations are made using JavaScript, so they cannot be accessed directly as Python variables. However, the input to the tool must be a Python list of strings.

Usage Example

from nerna import NERAnnotator

# List of texts to annotate
texts = [
    'Brazil won the 2002 World Cup.',
    'The planet’s drinking water is running out.'
]

# Initialize annotation
annotator = NERAnnotator(texts)

# Render the interactive annotation interface
annotator.render()

NERNA Screenshot


Notes

  1. Retrieve annotations:

    There are two ways to retrieve the annotated data back into Python:

    Option A: Export to Python Variable (Recommended for Colab/Jupyter)

    Pass the name of your variable to the render method:

    # 1. Initialize
    annotator = NERAnnotator(texts)
    
    # 2. Render with variable name
    annotator.render(variable_name="annotator")
    
    • In the UI, click the "🐍 Export to Python" button.
    • Access the data in Python:
    # After clicking the button:
    print(annotator.annotations)
    

    Option B: Load from JSON (Fallback)

    • Click "📥 Download All" in the UI to save a .json file.
    • Load it in Python:
    from nerna import load_annotations_from_json
    
    data = load_annotations_from_json("path/to/all_annotations_....json")
    print(data)
    
  • Annotated results are not automatically returned to Python unless you use the "Export to Python" button.
  • Ideal for manual review, small-scale labeling tasks, or quick experimentation in NLP workflows.

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

nerna-0.2.1.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

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

nerna-0.2.1-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file nerna-0.2.1.tar.gz.

File metadata

  • Download URL: nerna-0.2.1.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for nerna-0.2.1.tar.gz
Algorithm Hash digest
SHA256 6ff929bc2da7dcb5fdc81b5bb37654d5bab12594b07847e9338c372ab99a1546
MD5 992d8e3d23cc3265c44da24570e4f8ab
BLAKE2b-256 a0cdd59c3f4d26cdb0a04288b74af210e1b6c6d32b179d9cca4f3ad2a2fdb084

See more details on using hashes here.

File details

Details for the file nerna-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: nerna-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for nerna-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2f65c7495ecb1e8bab7a24e84b8ba388ff60b1167c31708d0e780140927d55d4
MD5 1c41a5e80fb45f49145c07b196b7857a
BLAKE2b-256 35d04a52b2c1d082aa467643ba09d5a5afa716c322621f7772800ce895ebea46

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