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.1.tar.gz (35.8 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.1-py3-none-any.whl (40.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nltx-0.2.1.tar.gz
  • Upload date:
  • Size: 35.8 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.1.tar.gz
Algorithm Hash digest
SHA256 8e43549290566e32818396f33dc7a611b28ad4ae4ee785ae10ab956111977737
MD5 9d616c1ce56341ad6ea4a9c366e560b8
BLAKE2b-256 cefefd3626ff2f3f613b18633f6a27a4d659a51a27a8c43fabf588c167064682

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nltx-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 40.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 590d403061da3c6fafb4c36a47308724f0875b7b7a1cf0fe800601aeab61a020
MD5 c17cc1d29aae65dc918bea9889fe8ee6
BLAKE2b-256 2ea1fe8d60fff46e81d9b8c8bf94c17cfe369049cd29425e44812a33b1aaacf5

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