Metadata-Version: 2.4
Name: nlp-lab-experiments
Version: 0.0
Summary: Notebook-ready NLP lab experiments for Jupyter and Google Colab
License-Expression: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Education
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Text Processing :: Linguistic
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# NLP Lab Experiments

Notebook-ready implementations of the seven complete NLP lab programs supplied in the lab manual. The examples are adapted to run in Jupyter Notebook and Google Colab, with malformed indentation and syntax corrected and code comments removed from the inserted programs.

The PyPI distribution is named `nlp-lab-experiments`; the Python import name remains `NLP`.

## Install

```bash
pip install nlp-lab-experiments
```

## Use in Jupyter or Google Colab

```python
%pip install nlp-lab-experiments
import NLP
NLP.p1()
```

Run the setup and call in one cell. Calling `p1()` replaces that cell's input with the program source. Review and run the replacement cell yourself. The package checks and installs the known third-party dependency needed by that experiment when it is missing. It does not install packages during import or run the program automatically.

The replacement removes the install command and `NLP.p1()` call when they are in the same cell, leaving the program source as the only code in that cell. If installation was run in a separate earlier cell, that cell is left alone; there is no shared IPython API for safely identifying and deleting an arbitrary earlier cell in all supported frontends.

## Programs

| Call | Program |
| --- | --- |
| `NLP.p1()` | Text preprocessing: tokenization, filtration, script validation, stop-word removal, and stemming |
| `NLP.p2()` | Unigram, bigram, and trigram probability estimates |
| `NLP.p3()` | Minimum edit distance with test cases and a dynamic-programming table |
| `NLP.p4()` | Top-down and bottom-up parsing from a context-free grammar |
| `NLP.p5()` | Add-one-smoothed Naive Bayes movie-review classification |
| `NLP.p6()` | NLTK corpora, custom corpus, frequency distributions, POS tags, dictionaries, and word segmentation |
| `NLP.p7()` | WordNet synonyms and antonyms for “active” |

The manual includes an eighth experiment prompt about low-resource machine translation, but it does not include a corresponding program listing. This release contains the seven program listings that were provided.

## Release

Build distributions from this directory:

```bash
python -m build
```

Upload using a PyPI API token stored in the `PYPI_API_TOKEN` environment variable:

```bash
TWINE_USERNAME=__token__ TWINE_PASSWORD="$PYPI_API_TOKEN" python -m twine upload dist/*
```

Do not put the token in source code, notebook cells, or shell history.
