--- title: Clerina - Everyday Romansh Phrases emoji: 🏔️ colorFrom: red colorTo: blue sdk: gradio sdk_version: 6.30.0 app_file: app.py pinned: false license: cc-by-nc-4.0 short_description: Everyday Romansh phrases for your Graubünden idiom models: - ZurichNLP/romansh-nllb-1.3b-ct2 --- # Clerina – everyday Romansh phrases **Live: https://clerina.ch** · Hugging Face Space: `sleiron/allegra-romansh-phrases` Prototype by Sandro Barbieri, University of Zurich, CAS Generative AI, Class Fall 2026. Clerina helps visitors to Graubünden greet locals in *their* Romansh. It finds where you are (device location, or a town / postcode you type), works out the Romansh idiom spoken there and shows 11 everyday phrases plus counting 1–10 in that idiom, with pronunciation audio and a map of the idiom areas. Romansh has **five regional idioms** – Sursilvan, Sutsilvan, Surmiran, Puter, Vallader – and **Rumantsch Grischun**, the common written standard. Outside the Romansh area Clerina shows Rumantsch Grischun. ## Features - **Where am I?** Device location or a typed place name / postcode (swisstopo search); the step 2 heading then says e.g. "You are in Scuol – the local idiom is Vallader" with the idiom in its map colour. - **Idiom map** on the swisstopo national map with the municipalities of each idiom. - **Phrase table** for the current idiom, or all five idioms side by side (local idiom first, then by distance, Rumantsch Grischun last), with the meaning in the interface language. - **Pronunciation audio** (computer voice for now, each clip checked by a Romansh speech recogniser). - **Five interface languages** (EN, DE, FR, IT, RM): follows the browser language, remembers the choice. - **Light view by default**, dark view on request; mobile layout. - **About page** with sources, credits, a plain-language "how it was built" and an architecture diagram. - **Readable for search engines and AI assistants**: plain HTML phrase pages in English, German, French and Italian (`/en/`, `/de/vallader`, `/fr/bonjour`, …), sitemap, robots.txt (AI crawlers welcome), `llms.txt`, structured data. ## Documentation | Document | Contents | |---|---| | [docs/architecture.md](docs/architecture.md) | Code structure, request flow, location → idiom logic, serving, front-end details | | [docs/content.md](docs/content.md) | Where the Romansh comes from, verification rules, audio, how to change content | | [docs/operations.md](docs/operations.md) | Local setup, deploy, domain (AWS), monitoring, traffic and costs, troubleshooting | | [docs/decisions.md](docs/decisions.md) | Decision log, design rules and open points | ## Quick start ``` python -m venv %USERPROFILE%\.venvs\bundi %USERPROFILE%\.venvs\bundi\Scripts\pip install -r requirements-dev.txt %USERPROFILE%\.venvs\bundi\Scripts\python app.py # http://127.0.0.1:7860 ``` Deploy: `git commit`, then `python tools\deploy.py` (see [docs/operations.md](docs/operations.md)). ## Project structure | File | Purpose | |---|---| | `app.py` | UI layout, event wiring, HTML builders for results/tables; starts the server | | `romansh.py` | Village list, location → idiom, swisstopo place search, idiom ordering, phrase table access, optional translation model | | `i18n.py` | All interface texts in EN/DE/FR/IT/RM, region descriptions, tips, phrase meanings | | `brand.py` | Design tokens (light/dark), Gradio theme, CSS, header panorama, hero/step/footer HTML, theme JS | | `map_view.py` | Leaflet map (swisstopo tiles + idiom areas) rendered in an iframe | | `about.py` | About page: sources, how it was built, diagram, technologies, imprint | | `preview_tags.py` | ASGI wrapper for the app pages: link-preview tags, title/description/canonical, crawler fallback text | | `seo.py` | Content pages per language / idiom / phrase, sitemap, robots.txt, llms.txt, Markdown table, manifest | | `phrases.json` | The phrase table (built by `tools/build_phrases.py` and `tools/build_numbers.py`) | | `regions.geojson` | Municipality outlines per idiom (built by `tools/build_regions.py`) | | `audio/` | Pronunciation clips `audio//.mp3` and `audio/manifest.json` | | `static/preview.png` | Link-preview image (built by `tools/make_preview.py`), served at `/preview.png` | | `static/icons/` | Favicon and app icons (built by `tools/make_icons.py`) | | `tools/` | Build scripts (phrases, numbers, regions, audio, preview image, icons) and the deploy script | ## Licence and notes The ZurichNLP model and the OmniVoice voice are CC BY-NC 4.0, so Clerina is **non-commercial**. Base map, boundaries and place search © swisstopo. The visual style is inspired by Swiss tourism design; no official logos, names or photos are used. Independent project, not affiliated with Switzerland Tourism or Lia Rumantscha.