Skip to main content

Offline NLP/NLT lab reference library with packaged JSON datasets

Project description

nltx

nltx is an offline Python package for serving lab content converted from raw Jupyter notebooks into structured JSON.

Install

From the project root:

pip install .

After publishing to PyPI:

pip install nltx

Usage

from nltx import (
    details,
    cell,
    description,
    working,
    explain,
    guide,
    inputGuide,
    cautions,
    help,
)

print(details("lab1"))
print(cell("lab1", 1, "A"))
print(description("lab1", "A"))      # variant-level description
print(working("lab1", "A"))          # variant-level working mechanism
print(description("lab1", 1, "A"))   # optional cell-level description (backward compatible)
print(working("lab1", 1, "A"))       # optional cell-level working (backward compatible)
print(explain("lab1", 1, "A"))
print(guide("lab1", "A"))
print(inputGuide("lab1", "A"))
print(cautions("lab1", "A"))
print(help())

Lab Data Structure

Each lab JSON file (nltx/data/<lab>.json) uses:

{
  "title": "<lab-name>",
  "variants": {
    "A": {
      "title": "Default variant",
      "cells": [
        {
          "code": "<code>",
          "description": "<what this cell does>",
          "working": "<how this cell works>",
          "explanation": "<combined description + working>",
          "metadata": {}
        }
      ],
      "description": "<variant-level summary>",
      "differenceFromOtherVariants": "<how this variant differs from sibling variants>",
      "workingMechanism": "<step-by-step variant execution summary>",
      "cellWorkings": [
        {
          "cellNumber": 1,
          "description": "<what cell does>",
          "working": "<how cell works>"
        }
      ],
      "guide": "",
      "inputGuide": "",
      "cautions": [],
      "sourceNotebook": "raw/lab1A.ipynb",
      "introMarkdown": "",
      "rawNotebookMetadata": {}
    }
  }
}

Data Workflow

  • Notebook files are maintained in the project root raw/ directory.
  • JSON files in nltx/data/ are curated manually from those notebooks.
  • The package reads only packaged JSON data at runtime.
  • The project does not use an in-package converter module.

Current Scope

  • Current packaged labs: lab1, lab2, lab3, lab4, lab5, lab7, lab8
  • Multiple variants are supported per lab (A/B/C based on availability)
  • Markdown parsing and advanced enrichment are intentionally out of scope for now

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

nltx-0.2.0.tar.gz (33.4 kB view details)

Uploaded Source

Built Distribution

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

nltx-0.2.0-py3-none-any.whl (38.1 kB view details)

Uploaded Python 3

File details

Details for the file nltx-0.2.0.tar.gz.

File metadata

  • Download URL: nltx-0.2.0.tar.gz
  • Upload date:
  • Size: 33.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for nltx-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1f7bdec9d27ddd276082647739c125832aa3c7f7dc1539aa972570e273cc9c09
MD5 5b22816d303257ebdde74c96164067f7
BLAKE2b-256 ad5e65a3f84fa1ceef62b03bb8084f0f755fb7e14d1bedeb33f4e33b2ea2b699

See more details on using hashes here.

File details

Details for the file nltx-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: nltx-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 38.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for nltx-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fb6ee190234c3700eb768675cd78af1f993b962fad6dedcb9c62bfb3d9695db8
MD5 3c9224f6c1cb38de7b58c81c91d059c6
BLAKE2b-256 909cc7a56211fa29e88ae4a63bf077d633f5ebb5e83515ff18d23d9b7317aa2a

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