tane/apps/app_seeds/tool/curated_overrides.json
vjrj 959fa2551c feat(species): expand catalog to ~1200 edible species from Wikidata
Grow the bundled species catalog from 14 hand-curated entries to ~1200
edible/cultivated species, internationalized in 13 languages (es, en, fr,
de, it, pt, ca, gl, eu, ar, zh, ja, ru — Latin + Arabic RTL + CJK + Cyrillic).

- Add a reproducible generator (tool/gen_species_catalog.dart) that queries
  Wikidata (CC0, no attribution burden) in two phases, filters out
  non-vernacular noise (author citations, ranks, initials) and applies a
  relevance floor, then merges hand-curated, authoritative core-crop data
  (tool/curated_overrides.json: names, family, viability_years). GBIF is used
  only as an identifier. The generated species.json (v3) is committed.
- Carry wikidata_qid and gbif_key through the parse/seed pipeline; the columns
  already existed, so no DB migration.
- Rewrite seedBundled to one read + one batch (was a SELECT per species on
  every startup — a real cost at ~1200 rows) and keep it idempotent with
  backfill of the new reference fields.
- Move species search filtering to SQL (LIKE) so a large catalog is not pulled
  into memory on every keystroke.
- Cover the generator transform, the generated asset, and the new fields with
  tests.
2026-07-10 02:00:47 +02:00

19 lines
2.5 KiB
JSON

{
"note": "Hand-curated, authoritative data for core crops, merged into the generated catalog by gen_species_catalog.dart. For a listed species the curated common names win (placed first, never dropped by the vernacular filter), and its family/viability_years override Wikidata; Wikidata still enriches with additional languages. A curated species is always kept even if it would miss the relevance floor. `viability_years` is public-domain agricultural-extension seed longevity (Wikidata has none); a conservative single value used to warn about aging lots. Extend this list to pin the names of species that matter to your community.",
"species": {
"Solanum lycopersicum": { "family": "Solanaceae", "viability_years": 5, "common": { "es": ["Tomate"], "en": ["Tomato"] } },
"Solanum melongena": { "family": "Solanaceae", "viability_years": 5, "common": { "es": ["Berenjena"], "en": ["Aubergine", "Eggplant"] } },
"Capsicum annuum": { "family": "Solanaceae", "viability_years": 3, "common": { "es": ["Pimiento", "Guindilla"], "en": ["Pepper", "Chilli"] } },
"Phaseolus vulgaris": { "family": "Fabaceae", "viability_years": 3, "common": { "es": ["Judía", "Alubia", "Habichuela"], "en": ["Common bean"] } },
"Vicia faba": { "family": "Fabaceae", "viability_years": 4, "common": { "es": ["Haba"], "en": ["Broad bean", "Fava bean"] } },
"Pisum sativum": { "family": "Fabaceae", "viability_years": 3, "common": { "es": ["Guisante"], "en": ["Pea"] } },
"Zea mays": { "family": "Poaceae", "viability_years": 2, "common": { "es": ["Maíz"], "en": ["Maize", "Corn"] } },
"Cucurbita pepo": { "family": "Cucurbitaceae", "viability_years": 5, "common": { "es": ["Calabacín", "Calabaza"], "en": ["Courgette", "Zucchini", "Squash"] } },
"Cucumis sativus": { "family": "Cucurbitaceae", "viability_years": 5, "common": { "es": ["Pepino"], "en": ["Cucumber"] } },
"Lactuca sativa": { "family": "Asteraceae", "viability_years": 3, "common": { "es": ["Lechuga"], "en": ["Lettuce"] } },
"Beta vulgaris": { "family": "Amaranthaceae", "viability_years": 4, "common": { "es": ["Acelga", "Remolacha"], "en": ["Chard", "Beetroot"] } },
"Allium cepa": { "family": "Amaryllidaceae", "viability_years": 1, "common": { "es": ["Cebolla"], "en": ["Onion"] } },
"Allium sativum": { "family": "Amaryllidaceae", "viability_years": 1, "common": { "es": ["Ajo"], "en": ["Garlic"] } },
"Daucus carota": { "family": "Apiaceae", "viability_years": 3, "common": { "es": ["Zanahoria"], "en": ["Carrot"] } }
}
}