Skip to content

HTML <ruby> Element needs extra processing #242

Description

@DYY-Studio

<ruby> Element is frequently used in Korean/Japanese articles.

Currently we do not process <ruby>, which leads to bad translation as LLM may think it's a part of sentences, or cannot connect it to the text around, especially in plain-text mode.

<ruby> in Japanese books not just means pronunciation. It's better to preserve Ruby in some ways.

I have no clear idea how to improve this. Fallback using <rp> / just like <rp> in legacy browsers maybe a good idea, not so perfect but acceptable.

宇宙そら -> 宇宙(そら)

地球アース -> 地球(アース)


Examples of common ruby usage in Japanese Books

Especially in Light Novel, Shin-bungei, Manga, Web Novel

  1. Contextual Readings
    Assigning a non-standard, meaning-based reading to a kanji based on the author's intent or specific context.

宇宙そら

  • 宇宙: Cosmos
  • そら: Sky
  1. Foreign Loanwords
    Using katakana ruby to give a native Japanese kanji an English or foreign pronunciation.

地球アース

  • 地球: Earth (Kanji)
  • アース: Earth (Katakana / Loanword from English)
  1. Double Meanings
    Conveying two layers of meaning simultaneously. The base kanji represents the underlying meaning or inner thoughts, while the ruby represents what the character physically says out loud.

ライバル

  • 友: Friend
  • ライバル: Rival
  1. Fictional Terminology / World-building
    Providing unique, stylized pronunciations for fictional techniques, spells, or fantasy terms.

滅竜魔法ドラゴンスレイヤー

滅竜魔法: A magic can kill dragon
ドラゴンスレイヤー: Dragon Slayer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions