Skip to content

Normalize city names in location field (canonical city-based values) #33

Description

@Metrohan

What to build / Ne yapılacak

EN: The roadmap item "Location data normalization (Online / city-based)" has two halves: the online-variant half is covered by #17 (merging "Zoom", "Webinar", etc. into "Online") and #18 (not defaulting to "Online" on extraction failure). The city-based half is not yet covered: physical-venue location strings currently vary per scraper (e.g. "İstanbul", "Istanbul", "ISTANBUL, Türkiye", "Ankara ODTÜ Teknokent"). A normalizer should extract/canonicalize the city name into a consistent value (e.g. Turkish city names with correct casing/diacritics) so the frontend can reliably filter and group events by city.

TR: Yol haritasındaki "Konum verisi normalizasyonu (Online / şehir bazlı)" maddesinin online kısmı #17 ve #18 ile karşılanıyor. Şehir bazlı kısmı henüz karşılanmıyor: fiziksel etkinliklerin konum metinleri scraper'a göre farklılık gösteriyor (örn. "İstanbul", "Istanbul", "ISTANBUL, Türkiye", "Ankara ODTÜ Teknokent"). Şehir adını tespit edip standart bir değere (doğru büyük/küçük harf ve Türkçe karakterlerle) indirgeyen bir normalizer eklenmeli; böylece frontend şehre göre güvenilir şekilde filtreleme/gruplama yapabilsin.

Acceptance criteria

  • A reusable helper (e.g. normalize_city(raw: str) -> str | None) maps known city-name variants/casing to a canonical form.
  • Physical-venue strings that embed a city name (e.g. "Ankara ODTÜ Teknokent") are not mangled — only the city token is canonicalized, the rest of the venue text is preserved or the city is extracted into a separate field per current schema.
  • Unrecognized/unparseable venue strings are left unchanged rather than dropped.
  • Unit tests cover common variants for major Turkish cities (İstanbul, Ankara, İzmir, etc.) plus at least one unrecognized-string passthrough case.

Blocked by

None — pairs well with #17 and #18 but is independently mergeable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    data-qualityData accuracy and consistency issuesenhancementNew feature or requestscraperRelated to scraper modules

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions