Metadata-Version: 2.4
Name: yibelang
Version: 2.1.0
Summary: Y-ibe - machine learning in plain English. No syntax. No cloud. Your data never leaves your computer.
Author: Yatharth Bhatt
License: MIT
Project-URL: Homepage, https://github.com/yibelang/yibe
Project-URL: Documentation, https://github.com/yibelang/yibe/tree/main/docs
Project-URL: Issues, https://github.com/yibelang/yibe/issues
Keywords: machine-learning,education,plain-english,dsl
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Education
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas>=1.5
Requires-Dist: scikit-learn>=1.2
Requires-Dist: matplotlib>=3.6
Requires-Dist: joblib>=1.2
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pyinstaller; extra == "dev"
Dynamic: license-file

# Y-ibe — machine learning in plain English

**No syntax. No setup headaches. No cloud. Your data never leaves your computer.**

Y-ibe is a tiny programming language where you write machine learning as ordinary
English sentences, one per line. The `yibe` tool translates your sentences into
real Python (pandas + scikit-learn) and runs it locally. It is 100% deterministic —
no AI, no API keys, no network calls, same input → same output, forever.

```text
get data from "houses.csv" and call it houses
put columns of houses named square_feet and bedrooms into features
put column of houses named market_value into targets
make a linear regression model called price calculator
train price calculator using features and targets
check how good price calculator is on features and targets
```

```
$ yibe run prices.yibe
Score for price_calculator: 0.973
```

Six sentences. A real, trained, scored model — running the same C-powered
libraries the experts use.

## Install

```
pipx install yibelang        # recommended (or: pip install yibelang)
yibe version
```

More options (venv, from source) in [INSTALL.md](INSTALL.md).

## Try it in 60 seconds

```
yibe examples                          # list the bundled example scripts
yibe run examples/04_house_prices.yibe # train your first model
yibe check examples/04_house_prices.yibe   # validate without running
yibe show-python examples/04_house_prices.yibe  # see the Python it writes
```

`show-python` is the graduation path: when you're ready to learn Python, Y-ibe
shows you exactly what it has been writing for you all along.

## What you can say

The full sentence list lives in [docs/LANGUAGE.md](docs/LANGUAGE.md) (it is
generated from the grammar itself, so it can never go stale). Highlights:

| You write | Y-ibe does |
|---|---|
| `get data from "sales.csv" and call it sales` | loads a CSV (or .xlsx) with pandas |
| `remove rows with missing values from sales` | cleans your table |
| `keep rows of sales where units is greater than 0` | filters rows |
| `make a random forest model called sorter` | linear/logistic regression, decision tree, random forest, neural network |
| `split features and targets into training and testing parts` | honest train/test split |
| `train sorter using x_train and y_train` | fits the model |
| `check how good sorter is on x_test and y_test` | scores it |
| `use sorter to predict from features and call it guesses` | predictions |
| `save sorter to "sorter.yibemodel"` / `load model from ...` | reuse models later |
| `draw a scatter of square_feet versus market_value from houses` | charts |
| `if price limit is greater than 200000` + indented block, `otherwise`, `repeat 3 times` | decisions and loops (v1.1) |
| `कीमत गणक को features और targets से सिखाओ` · `entrena calculador de precios con features y targets` · `用features和targets训练价格计算器` | whole other human languages — Hindi, Spanish, and Mandarin ship built in (`lang: hi/es/zh`); a language pack is just a folder of JSON |

## Errors that talk like a person

Y-ibe never shows you a raw traceback. Mistakes are caught **before** your
script runs whenever possible, and every runtime failure is translated:

```
🌊 Y-ibe hit a wave:
Hey, I tried looking for your file, but it isn't in this folder.
Fix: double-check the spelling inside your quotes and make sure the file is in
the same folder you're running from. (I looked for: houses.csv)
This happened around line 1 of your script: get data from "houses.csv" and call it houses
```

Typos get suggestions ("Did you mean...?"), using a model before training it is
caught at check time, and `--debug` reveals the real traceback when you want it.
The full catalogue is in [docs/ERRORS.md](docs/ERRORS.md).

## Honest positioning

Y-ibe is a deterministic, friendly front-end over pandas and scikit-learn —
"just a DSL", and proudly so. The bet is that what actually blocks beginners is
not the math, it's the syntax and the terrifying error messages. Y-ibe removes
exactly those two things and nothing else:

- **It is not an AI product.** Fixed sentence templates, matched offline. No
  hallucinations, no API costs, no privacy risk.
- **It is not a Python replacement.** It *writes* Python for you, and shows it
  to you on request.
- **It is as fast as Python + scikit-learn** — because that is literally what
  it runs.

## For teachers

Students express *intent* ("train the model, check it on unseen data") before
they ever fight a bracket. `yibe check` explains mistakes in sentences, and
`yibe show-python` turns every script into a Python lesson. The bundled
examples (`yibe examples`) are a ready-made first lab.

## Contributing

The perfect first contribution is one new sentence: a regex template + an AST
node + its codegen + six tests + a doc example. See
[CONTRIBUTING.md](CONTRIBUTING.md). Feature ideas go through YEPs
(Y-ibe Enhancement Proposals) — open an issue.

## License

MIT — see [LICENSE](LICENSE).
