semvec/pypi-packages huggingface dataset:
menupal 0.1.3
Menu Recommendation Tool
Requires Python: >=3.10
Keywords: menu recommendation utils tool

# mc-menu-picker

A content-based recommendation system built on McDonald's menu nutrition data. It computes multi-dimensional similarity across numeric, ingredient, and category features and provides the top-N most similar menu items.

## ✨ Features

| Feature | Description |
|---------|-------------|
| **🔢 Numeric Similarity** | Cosine similarity calculation based on calories, fat, carbohydrates, and other numeric fields |
| **🥗 Ingredient Similarity** | Jaccard similarity calculation based on one-hot encoded ingredient features |
| **📂 Category Similarity** | Jaccard similarity calculation based on one-hot encoded category features |
| **⚖️ Weighted Fusion** | Combines three similarity matrices with customizable weights (default `[0.4, 0.35, 0.35]`) |
| **💻 Local Recommendation** | Run `python main.py` to randomly select items and list top-K similar items |
| **🚀 RESTful API** | Launch FastAPI service via `./scripts/api.sh` for external calls |

## 📦 Installation

```bash
git clone https://github.com/911218sky/mc-menu-picker.git
cd mc-menu-picker
pip install -r requirements.txt
```

## 📊 Data Preparation

**Alternative:** You can also download the dataset directly - [download here](https://github.com/911218sky/mc-menu-picker/releases/tag/V1).

**Step 1:** Extract the provided dataset
```bash
# Example extraction (adjust path as needed)
unrar x data.rar ./
```


The program loads raw data and feature matrices, builds or loads the combined similarity matrix, and displays the top-10 recommendations for a random test ID.

## 🌐 API Service

Start the FastAPI service using the following command:

```bash
bash ./scripts/api.sh
```

### Environment Variables

| Environment Variable | Description | Default Value |
|---------------------|-------------|---------------|
| `HOST` | Bind address | `0.0.0.0` |
| `PORT` | Listening port | `3010` |
| `PRODUCTION` | If set to `true`, disables `/docs` and `/redoc` endpoints | `false` |

### 📖 API Documentation

After startup, visit `http://localhost:3010/docs` to explore the Swagger UI interface.

---

## 🔧 Development Notes

- **Similarity Calculation**: The system combines three different similarity algorithms for numeric, ingredient, and category features
- **Flexible Weighting**: Weight ratios for different features can be adjusted according to requirements
- **High Performance**: Pre-computed similarity matrices provide fast recommendation responses

## 📝 Usage Examples

**Local Recommendation:**
```bash
python ./src/main.py
# Output: Random item and its top-10 similar recommendations
```
diacritics-normalization 0.1.0
A small utility library that normalize hebrew diacritics in text.
Requires Python: >=3.7

Hebrew diacritics normalization
- Introduced normalize_hebrew_diacritics() in hebrew/diacritics.py to correct niqqud and dagesh/sin-dot ordering.

This ensures that diacritics appear in a consistent canonical order:
dagesh > shin/sin dots > vowel marks.