Skip to main content

nlpeasykit

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

pip install nlpeasykit
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:

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.

Metadata

Release files for nlpeasykit 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nlpeasykit 0.2.1
File Size Uploaded Provenance
nlpeasykit-0.2.1.tar.gz 20.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for nlpeasykit 0.2.1
File Interpreter ABI Platform
nlpeasykit-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 37.8 kB

Release files / nlpeasykit-0.2.1.tar.gz

Download URL nlpeasykit-0.2.1.tar.gz
Size 20.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d0a26c889008913508852d7fb929cad551c48003d113ceee9eee76d3a09493c2
BLAKE2b-256 checksum
How to use checksums
d3fde9a47638d2be4a3f1ec2777829d0ea186d6274920fed10d04b676c4a9693
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / nlpeasykit-0.2.1-py3-none-any.whl

Download URL nlpeasykit-0.2.1-py3-none-any.whl
Size 17.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a3d931ea1e4cc270306b59144162956c58429915f09de6c0737d6f7ec5a4589e
BLAKE2b-256 checksum
How to use checksums
d4e924c3ea167f1ec46ac24034da1c9d1d64dab897cdb0e6e4b0919e5260564f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Security for nlpeasykit 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page