['class=[\'"][^\'"]*word[^\'"]*[\'"][^>]*data-word=[\'"]([^\'"]+)[\'"][^>]*data-gloss=[\'"]([^\'"]+)[\'"][^>]*>', 'matches = re.findall(pattern, html, re.IGNORECASE)\n\nprint(f"Found {len(matches)} word-gloss pairs', 'Build dictionary: gloss (lower) -> quenya word\neng_to_quenya = {}\nfor quenya, gloss in matches:\n    gloss_lower = gloss.lower()\n    # Keep only first sense before semicolon or comma\n    gloss_lower = gloss_lower.split(\';\')[0].strip()\n    gloss_lower = gloss_lower.split(\',\')[0].strip()\n    # Skip multi-word glosses for now (simple mapping)\n    if \' \' not in gloss_lower:\n        eng_to_quenya[gloss_lower] = quenya\n\nprint(f"Simple word mappings: {len(eng_to_quenya)}', 'with open(\'/tmp/eng_to_quenya.json\', \'w\', encoding=\'utf-8\') as f:\n    json.dump(eng_to_quenya, f, ensure_ascii=False, indent=2)\n\nprint("\nSample mappings:', "for k in list(eng_to_quenya)[:20]:\n    print(f'  {k} -> {eng_to_quenya[k]}')"]