Skip to content

Commit 383acbf

Browse files
feat(data): add SweetenersDB β†’ sweetness-intensity regressor
Map SweetenersDB v2.0 logSw (MIT, authors chemosim-lab/Bouysset); trains the sweetness-intensity head (R2=0.82) + ONNX export. Closes #36.
1 parent 2507296 commit 383acbf

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

β€Ždocs/DATA-SOURCES.mdβ€Ž

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ What feeds the models, what each source unlocks, its license, and how to get it.
1515
| **cosylab/bittersweet** | more sweet/bitter volume | AGPL-3.0 | ⬜ to get | `git clone github.com/cosylabiiit/bittersweet` β†’ `bittersweet/data/*.tsv`. AGPL: keep a CC-BY-clean build with `INCLUDE_COSYLAB=False`, or opt in deliberately. |
1616
| **FlavorDB** | ~25k molecules taste+odor + natural-source mapping | confirm terms | ⬜ to get | REST/JSON API at `cosylab.iiitd.edu.in/flavordb` β†’ `flavordb_taste.csv`. Map taste fields; **[VERIFY] columns** before trusting. |
1717
| **UMP442 / BIOPEP-UWM** | more umami examples (only 283 now) | confirm terms | ⬜ to get | BIOPEP-UWM umami DB (form-driven) β†’ `umami_list.csv`. |
18-
| **SweetenersDB (ChΓ©ron 2017)** | the sweetness-**intensity** regressor (currently skipped) | publisher supp. | ⬜ to get | paper supplementary (~316 compounds, relative-to-sucrose) β†’ `sweeteners_db.csv`. Likely **paywalled β†’ manual grab**. |
18+
| **SweetenersDB v2.0** | the sweetness-**intensity** regressor | **MIT** | βœ… in use | direct CSV from `github.com/chemosim-lab/SweetenersDB` (`SweetenersDB_v2.0.csv`, 316 cmpds, `logSw` column). RΒ²β‰ˆ0.82. |
1919
| **Pyrfume / Leffingwell** | the **aroma model** (OpenPOM) β€” issues #17 / #18 | per-set; confirm | ⬜ to get | `git clone github.com/pyrfume/pyrfume-data`; Leffingwell odor set. Separate, version-fragile effort. |
2020
| **FEMA GRAS / FDA SAF** | GRAS cross-reference + dosing/OAV lookups | gov public / FEMA | ⬜ to get | FDA "Substances Added to Food" (public domain) β†’ `gras_reference.parquet`; FEMA use-level PDFs β†’ `properties.parquet`. **Verify every scraped dosing number.** |
2121

@@ -27,6 +27,7 @@ What feeds the models, what each source unlocks, its license, and how to get it.
2727
- **Column verification.** Each new source's column names must be checked against the
2828
loaders (the `[VERIFY]` markers) β€” see issue **#25**. ChemTastesDB's mapping is
2929
resolved (both the coarse `Class taste` and the granular `Taste` columns are parsed).
30-
- **Suggested priority.** (1) `Taste`-column mining β€” **done** βœ… β†’ (2) cosylab /
31-
FlavorDB for taste volume β†’ (3) SweetenersDB for the intensity head β†’ (4)
32-
Pyrfume / Leffingwell for the aroma model.
30+
- **Suggested priority.** (1) `Taste`-column mining β€” **done** βœ… β†’ (2) SweetenersDB
31+
intensity head β€” **done** βœ… β†’ (3) Pyrfume / Leffingwell for the aroma model β†’
32+
(4) cosylab for taste volume (AGPL β€” pending decision). **FlavorDB is
33+
CC BY-NC-SA (NonCommercial) β€” incompatible with a commercial product; skip.**

β€Žtraining/build_taste_dataset.pyβ€Ž

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,9 @@ def build_intensity(path):
248248
return None
249249
df = pd.read_csv(path)
250250
sc = _find(df, ["smiles", "canonical smiles"])
251-
vc = _find(df, ["relative_sweetness", "log_sweetness", "sweetness", "rs"])
251+
# SweetenersDB v2.0 (MIT) names it 'logSw' (log sweetness vs sucrose, ~316 cmpds);
252+
# also accept the generic names. [VERIFIED against SweetenersDB_v2.0.csv, 2026-06-26.]
253+
vc = _find(df, ["log_sweetness", "logsw", "relative_sweetness", "sweetness", "rs"])
252254
rows = []
253255
for _, r in df.iterrows():
254256
_, cs = canon(r[sc])

0 commit comments

Comments
Β (0)