Metadata-Version: 2.4
Name: nlpeasykit
Version: 0.2.1
Summary: Runnable NLP coursework examples and explained answers
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Provides-Extra: nltk
Requires-Dist: nltk<4,>=3.9; extra == "nltk"
Provides-Extra: spacy
Requires-Dist: spacy<4,>=3.8; extra == "spacy"
Provides-Extra: parsing
Requires-Dist: stanza<2,>=1.9; extra == "parsing"
Provides-Extra: ml
Requires-Dist: scikit-learn<2,>=1.5; extra == "ml"
Provides-Extra: neural
Requires-Dist: torch<3,>=2.4; extra == "neural"
Requires-Dist: transformers<5,>=4.45; extra == "neural"
Provides-Extra: spark
Requires-Dist: pyspark<5,>=3.5; extra == "spark"
Provides-Extra: web
Requires-Dist: beautifulsoup4<5,>=4.12; extra == "web"

# nlpeasykit

Fourteen NLP practical questions with example code, explanations, and expected answers. Requires Python 3.10 or newer.

```sh
pip install nlpeasykit
```

```python
import nlpeasykit as nlp

nlp.questions()  # List all fourteen questions
nlp.q1()        # Show question 1, example code and expected answer
nlp.q14()       # Show question 14
```

Use `q1()` through `q14()`. These functions display solutions. They do not run the displayed practicals or download models. Copy and execute the printed code to run an example.

## Questions

1. NLTK tokenization and stop words
2. spaCy tokenization and stop words
3. Stemming and lemmatization with spaCy tokens and NLTK stemming
4. NLTK stemming and lemmatization
5. Corpus statistics
6. Constituency parsing
7. Dependency parsing
8. Website POS tagging
9. Bigram sentence probability
10. Add-one smoothing
11. Good–Turing frequency
12. Text classification
13. Cosine vector similarity
14. Ambiguous word context using BERT

## Optional execution dependencies

Displaying answers needs no additional packages. Executing individual examples may require:

```sh
pip install "nlpeasykit[nltk,spacy,parsing,ml,web]"
python -m nltk.downloader punkt_tab stopwords wordnet averaged_perceptron_tagger_eng
python -m spacy download en_core_web_sm
python -c "import stanza; stanza.download('en')"
```

BERT requires `pip install "nlpeasykit[neural]"`; its first explicit use downloads model weights. Helper implementations are available in `nlp_course_kit`, included in this distribution. spaCy has no native stemmer, so question 3 combines spaCy tokens with NLTK's PorterStemmer.

## Limits

Core functions and all fourteen answer displays have been tested on macOS with Python 3.12. Windows and Linux have not been directly tested. Optional model integrations are not all tested end to end. Expected parser and model outputs describe typical results, not exact guarantees. Good–Turing uses a documented educational approximation for sparse counts. See the source distribution's TEST_RESULTS.md for verification details.
