--- license: cc-by-nc-4.0 task_categories: - feature-extraction - text-classification language: - en tags: - fragrance - perfume - cosmetics - recommendation-system - e-commerce - retail - fragrantica size_categories: - 10= 3: result[parts[0]] = { 'votes': int(parts[1]), 'percent': float(parts[2]) } return result longevity = parse_votes(row['longevity']) # {'very_weak': {'votes': 784, 'percent': 5.0}, 'weak': {...}, ...} ``` ### Parse v3.0 accords format with join ```python def parse_accords(accords_str, accords_df): """Parse v3.0 accords format: id:percent and join with reference""" result = [] for item in accords_str.split(';'): accord_id, percent = item.split(':') accord_info = accords_df[accords_df['id'] == accord_id].iloc[0] result.append({ 'name': accord_info['name'], 'percent': int(percent), 'bar_color': accord_info['bar_color'], 'font_color': accord_info['font_color'] }) return result ``` ### Parse notes pyramid with opacity/weight ```python import re def parse_notes_pyramid(pyramid_str): """Parse v3.0 notes pyramid with opacity and weight""" result = {'top': [], 'middle': [], 'base': []} for layer in ['top', 'middle', 'base']: match = re.search(rf'{layer}\(([^)]+)\)', pyramid_str) if match: for note in match.group(1).split(';'): parts = note.split(',') result[layer].append({ 'name': parts[0], 'id': parts[1] if len(parts) > 1 else None, 'url': parts[2] if len(parts) > 2 else None, 'opacity': float(parts[3]) if len(parts) > 3 else None, 'weight': float(parts[4]) if len(parts) > 4 else None }) return result ``` ## Use Cases - **Recommendation Systems** — Build "if you like X, try Y" engines using accords, notes, and also_like data - **Market Analysis** — Analyze trends by brand, country, year, or perfumer - **NLP** — Process descriptions, odor profiles, and pros/cons data - **Collection Apps** — Build fragrance tracking and discovery apps - **E-commerce** — Enrich product catalogs with detailed fragrance data - **Data Visualization** — Create accord charts with actual display colors from accords.csv ## File Format - **Format**: CSV (pipe `|` delimited) - **Encoding**: UTF-8 - **Quote Character**: `"` (double quote) ## Links - **Full Database**: [fragdb.net](https://fragdb.net) - **GitHub**: [github.com/FragDB/fragrance-database](https://github.com/FragDB/fragrance-database) - **Kaggle**: [kaggle.com/datasets/eriklindqvist/fragdb-fragrance-database](https://www.kaggle.com/datasets/eriklindqvist/fragdb-fragrance-database) ## License This sample is released under the **CC BY-NC 4.0 License**. Free for non-commercial use with attribution. The full database requires a commercial license — see [fragdb.net](https://fragdb.net) for details. ## Citation ```bibtex @dataset{fragdb2026, title={FragDB Fragrantica Fragrance Database}, author={FragDB}, year={2026}, version={3.1}, url={https://fragdb.net}, note={Sample dataset with 5 files, 67 fields} } ```