Alfredo
See exactly how TF-IDF, TextRank, and sentiment scoring work — with code you can read in 5 minutes — running at production speed.
Alfredo is not a wrapper around an LLM API. It's a self-contained, offline, dependency-light NLP toolkit built for two audiences at once: learners who want to see the actual math behind NLP tasks, and developers who want something fast enough to ship without API keys, network calls, or per-request costs.
Install
pip install -e ".[dev]"
Usage
import alfredo as nlp
nlp.summarize("Long article text...", num_sentences=2)
nlp.sentiment("This product is amazing!")
nlp.classify("Free money now!!!", labels=["spam", "not spam"])
nlp.extract_keywords("Machine learning is a subset of artificial intelligence...")
Why Alfredo
| Goal | Why it matters |
|---|---|
| No external AI API calls | Works offline, no API key, no per-call cost, no network latency |
| Readable source code | Every algorithm should be understandable in one sitting |
| Fast (NumPy-vectorized) | Not "slow but educational" — usable in real projects |
| Documented reasoning | docs/HOW_IT_WORKS.md explains the why, not just the what |
| Benchmarked | Speed claims backed by numbers vs. nltk/spaCy/textblob |
Benchmarks
Run python benchmarks/benchmark.py and paste real numbers here once available.
| Task | Alfredo | nltk | textblob |
|---|---|---|---|
| summarize | — | — | — |
| sentiment | — | — | — |
| extract_keywords | — | — | — |
Development
pip install -e ".[dev]"
pytest tests/
python benchmarks/benchmark.py
License
MIT — see LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file alfredo_ai-0.1.0.tar.gz.
File metadata
- Download URL: alfredo_ai-0.1.0.tar.gz
- Upload date:
- Size: 40.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f355b1d38df8c6dd3f03ffd8c22c1cbd3275568d236c39f16542093dbc1db64c
|
|
| MD5 |
19a4ea4c99ea0edbecad822e7e2fdbdf
|
|
| BLAKE2b-256 |
0177cf6a2291d2ab9c51d8556f0bc8f5636fc2726b987958a9f025f171d03cd7
|
File details
Details for the file alfredo_ai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: alfredo_ai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 38.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9e49b39a88fa27868d43a52480dd6df00afc4f233fb0634d6aad0ba31b7a09c
|
|
| MD5 |
ee483dc1c1cece972f2a65f65547e6d6
|
|
| BLAKE2b-256 |
f8f2b46fd58b0e7f25296e80c40cdbe8bc6296b4d0777e96ff54a9772473de22
|