Journal of the Text Encoding Initiative
Issue 14 | April 2021- March 2023

Selected Papers from the 2019 TEI Conference

Rubi as a Text: A Note on the Ruby Gloss Encoding
Kazuhiro Okada, Satoru Nakamura and Kiyonori Nagasaki

Electronic version
URL: https://journals.openedition.org/jtei/4403
DOI: 10.4000/jtei.4403
ISSN: 2162-5603
Publisher
TEI Consortium
Electronic reference
Kazuhiro Okada, Satoru Nakamura and Kiyonori Nagasaki, “Rubi as a Text: A Note on the Ruby Gloss
Encoding”, Journal of the Text Encoding Initiative [Online], Issue 14 | April 2021- March 2023, Online
since 14 February 2023, connection on 13 March 2023. URL: http://journals.openedition.org/jtei/4403; DOI: https://doi.org/10.4000/jtei.4403

For this publication a Creative Commons Attribution 4.0 International license has been granted by theauthor(s) who retain full copyright.

Rubi as a Text

Rubi as a Text: A Note on the Ruby Gloss
Encoding
Kazuhiro Okada, Satoru Nakamura, and Kiyonori Nagasaki

SVN keywords: $Id: _debug_FO_jtei-cc-ra-okada-200.xml 1186 2023-03-03 08:44:49Z ron $ABSTRACTThis article describes a proposal for elements of ruby glossing that was incorporated into the TEI
Guidelines release 4.2.0, which was codenamed “Ruby.” The Japanese writing system is one of themost complex writing systems in the world, mixing three scripts. The system can also be describedas complex in terms of text linearity: the ruby gloss, originally developed from vernacular glosses
to Classical Chinese texts, is now a device for presenting a parallel text alongside the main text.
Ruby, or rubi, or furigana, can be used to give clues about phonation as well as to present anotherreading of the text, which sometimes can be an essential part of the text. Such a textual structure
requires another layer of semantics besides the existing set of vocabulary, such as <seg>, <note>

Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference1Rubi as a Text(or <add>) and <span>. Ruby glosses can also be double-sided. This note discusses the encodingof examples attested in real texts using proposed elements (<ruby>, <rb>, and <rt>), and also
considers Taiwanese bopomofo, a related gloss form.

INDEX
Keywords: ruby, Japanese text encoding, parallel textual structure, cultural accommodation

ACKNOWLEDGEMENTS
This paper has been developed from a paper presented at the 2019 TEI Conference. The authors
wish to express their gratitude to Nobutake Kamiya, Naoki Kokaze, So Miyagawa, and Wang
Yifan for their input in completion of the paper and the related proposal to the TEI TechnicalCouncil. Kazuhiro Okada wishes to express his gratitude for support from the Introduction of
TEI to Japanese Pre-modern Texts project at the National Institute of Japanese Literature; Satoru
Nakamura was supported by JSPS KAKENHI Grant Number JP19K20626; Kiyonori Nagasaki was
supported by JSPS KAKENHI Grant Numbers JP19H00516 and JP19H00526. The authors are sincerely
grateful for the concepts established by W3C (2001; 2013; 2014) and the clear guide developed by
Ishida (2016).

1. Introduction
1

Glossing is a custom found in most medieval manuscript cultures. In those cultures, phrases orwords written in classical languages are explained by marginalia, interlinear glosses, and the like,normally in a vernacular language. Whereas most of these traditions have been abandoned andhave not been incorporated into modern writing systems, glosses in the Japanese writing systemhave continuously evolved over the centuries, and are still used today. The Japanese gloss is now
called rubi ルビ, a Japanese rendition of the movable body type size “ruby.” This paper describes

the necessity of the ruby as an element set in the TEI Guidelines by explaining its characteristics. 1

Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference2

Rubi as a Text

2. Overview of Ruby
2

Other names for the ruby gloss include furigana 振り仮名 and bōkun 傍訓. Rubi was a slang term

used by printers in the early twentieth century, derived from the name of a size of movable type
imported from England, and it is now a standard term. In Japanese linguistics literature in Japanese,
the term furigana is preferred, as in Ōshima (1989), Konno (2009), and Yada (2018). In this article,

we consistently use the term “ruby,” following the convention adopted in markup languages.
3

Whereas interlinear glosses are not found exclusively in the Japanese writing system, and similar
phenomena can be observed in other East Asian material, the Japanese ruby is surely among
the most complex glosses. A ruby basically functions as a phonetic gloss to an attached Chinesecharacter, but it is not just a pronunciation aid; it can show multilayered reading or even encode
the main voice of the text (see section 3.2 for a detailed discussion). Encoding multilayered rubyglosses within the existing TEI framework had been a challenge.

4

A ruby gloss is visually aligned to some portion of text, but the relationship between a ruby and thetext which it glosses and which it is embedded in can be exible. This exibility allows certain typesof ruby to introduce nuanced or rather polyphonic expressions. First, the structure of polyphonictexts is, we believe, dierent from that of the interlinear glosses familiar from Western texts,
normally tagged with <add> or <note>, whose purpose is usually to clarify the meaning of thetext or to provide no more than a simple note, a common strategy used for encoding interlinear
glosses (see Estill, 2016). Second, ruby glosses can be structurally multilayered: as demonstrated
below, rubies can be doubled and even tripled, thus piling up multiple voices. This complexity,
which has hindered existing ruby markup, may be seen as odd. But from another perspective,
it is a unique characteristic of the ruby gloss. This article explores ways to conceptualize these
phenomena within a manageable structure.

5

Modeling a culturally specic phenomenon with TEI in order to introduce elements into a publicstandard, rather than creating a customized model, is also supported by the history of attempts
to mark up ruby glosses. In fact, the Japanese community has faced diculty with ruby markup
in various projects: see Kawase, Ichimura, and Ogiso (2013), on their Japanese literature corpus
building, and Cong and Takaku (2018), on Tang poems in secondary education textbooks in Japan.
While the former encodes the glossed text with <w> and the ruby text with @ana, the latterdirectly introduces a tagset from HTML. It indicates the diculty of sharing methods of encoding
Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference3

Rubi as a Text

interlinear glosses such as <note>, which are not explicitly included in the Guidelines. In thisregard, encoding the ruby model directly within the TEI Guidelines not only provides a markup
system natural to the text but accommodates other East Asian materials. This advance will alsobenet similar glossing practices around the world.
6

This paper is organized as follows: in section 3 we describe ruby examples from a historicalperspective. The rst half of section 4 demonstrates encoded examples, and the last half deals withan ecient way of modeling the ruby examples discussed. Section 5 discusses the proposal in lightof other East Asian materials.

3. Ruby Examples to Be Examined
7

This section briey explores the ruby examples to be considered. Before going deeper, we provide
a glossary to assist the discussion:
glossed text (base text; <rb>)
A part of text that is glossed. Usually in kanji, or Chinese characters, but not limited to them.
ruby text (gloss; <rt>)
A text that glosses the glossed text. In a plain text transcription, parenthesized text showsruby text. Usually written in hiragana (or katakana for loanwords), but not exclusively (kanji,
romaji, and also in Taiwan, bopomofo will appear).
ruby gloss (ruby glossed text; <ruby>)
A glossed text and its corresponding ruby text.

Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference4

Rubi as a Text

right- (top-) or left- (bottom-)sided rubyA ruby gloss whose position relative to the glossed text is semantically meaningful. In
Japanese, the default position is on the right side in a vertical text; in a horizontal text, thedefault position will be the top side. A ruby gloss placed on the other side implies a specialcase. A pair of ruby glosses that gloss a text from both right and left sides or top and bottom
sides is called a double-sided ruby. In other writing systems the default position may dier.
In the transcriptions in this paper, a ruby text in the default position precedes a text on
the other side.
kanji (Chinese character)
A script borrowed from the Chinese writing system for writing Japanese. Roughly speaking,it denotes either a word of Chinese origin, or the morphemic root of a Japanese native
content word.
kana
Kana was developed from a phonological usage of kanji to write native words. It is also a
cover term for hiragana and katakana (see below).
hiragana
Hiragana is a cursive development of kana. Among its uses in the contemporary Japanesewriting system, it denotes the agglutinative part of the language, which cannot be fully
specied with kanji. To illustrate the idea with English, given the word stronger, the rootpart, strong, would be written in kanji and the rest in hiragana. Hiragana is also preferred
when use of kanji seems not to be suitable.

Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference5

Rubi as a Text

katakana
Katakana is developed from components or fragments of a phonological usage of kanji.
It was a major component of the glossing system of Classical Chinese writing, and today
katakana signals that the expression is special. It is usually used for modern words
borrowed from Western languages and for words with colloquial nuances.
8

A description of ruby gloss patterns and backgrounds now follows. An adequate history of the rubygloss would require a book-length inquiry, but in this treatment we are going to concentrate on thehistory of its structure and related matters. For simplicity, we will rst review modern Japaneseruby glosses. Then we will proceed to historical ones, and lastly to Taiwanese bopomofo examples.

3.1 Modern Japanese Ruby Glosses
9

In modern Japanese texts, ruby glosses are used to gloss Chinese characters with kana syllabaries.
The relationship between glossed and ruby texts have two general patterns that can be
distinguished: either (A) the gloss is subject to the glossed text, or (B) the opposite. Ōshima (1989)
summarizes the possible ruby gloss patterns as follows:
A-a. Specifying phonation, pattern 1: to prevent confusion with another word withthe same orthography (such as Ōgoto ⼤事[おおごと] with Daiji, Ani-san 兄[あに]さん with Nii-san, or Hinichi ⽇⽇[ひにち] with Hibi).

A-b. Specifying phonation, pattern 2: to supply an accented reading (such as Senso 戦
争[せんそ] with Standard Japanese Sensō or Chau 違[ちゃ]う with Chigau).

A-c. Glossing a reading, pattern 1: to assist in the learning of new words. Orthography
and pronunciation of unfamiliar words are presented.
A-d. Glossing a reading, pattern 2: to explain unfamiliar orthography. The reader
would already know the word, but under a dierent orthography.
B-e. Specifying the meaning of the kana orthography. When the orthography isirregular for the gloss, as in rabirinsu 迷宮(ラビリンス) for meikyū, hito ⼥(ひと) for
on’na, and hairu 侵(はい)る for okasu.2

B-f. Specifying the items referred to by the gloss. Achira ⼤陸(あちら) for Tairiku andAni-san 伊兵衛(あに)さん for Ibē san.

Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference6Rubi as a Text

Figure 1. Original passage of Ōshima (1989).

(Ōshima 1989, 72–733)

Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference7

Rubi as a Text

10Ōshima (1989) adds other cases, for specifying the meaning of the Chinese character orthography(tabū 禁忌[タブー] [“taboo”] for kinki [“taboo” or “contraindication”]), and the equal (or rather

independent) relationship between the gloss and the glossed text (Wocchingu 再発⾒[ウォッチング] [“watching”] for saihakken [“rediscovery”]). We could add more patterns of glossing otherlanguage expressions. Here, what is important is that the uniform structure of the ruby gloss allows
all of the above patterns. In addition, these patterns are not exclusive.

11

Contemporary Japanese texts do not have ruby glosses unless they are needed. However, as seenin the above patterns, especially patterns A-b, B-e, and B-f, ruby glosses can be a device for rich
expressions. Moreover, occasionally the text is glossed on both the right and left, or the top andbottom sides. The examples below illustrate the usual single- and double-sided ruby glosses.

12

Note that single-sided ruby glosses have typographical complexities that are structurally
straightforward. (As we will see later, HTML schemas have been concerned with typographicalmatters.) The examples below, gures 2, 3, and 4 (written top to bottom and right to left) show
some typographical conventions when glossing words with complex orthography: 4•••“真⾯⽬(ま/じ/め)” (from gure 2)“浴⾐(ゆかた)” (from gure 3)“あんたの/鼾(いびき)” (from gure 4)

Figure 2. Kawakami Hiromi. 1998. Yashi, Yashi 椰⼦・椰⼦, p. 21, detail. Tokyo: Shinchosha.

Figure 3. Kawakami Hiromi. 1998. Yashi, Yashi, p. 21, detail. Tokyo: Shinchosha.

Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference8Rubi as a Text

Figure 4. Kawakami Hiromi. 1998. Yashi, Yashi, p. 29. Tokyo: Shinchosha.

13

Unlike its appearance in the second (gure 3), the ruby text (“いびき”) is not glossed to the word“の.” This is because ruby glosses can be placed alongside a neighboring word if it would not be

misleading, especially if the glossed text is in kanji and the neighboring words are in kana. This
is not a structural but a typographical matter; see W3C (2012, §3.3.5, gs. 121, 122) for further
illustrations.
14

Yet another example of a single-sided ruby gloss is of the pattern II-e (gure 5, written top tobottom and right to left). Here the translator rendered the name of an Ainu divinity, kamuy’otopus,

in Japanese characters that were equivalent to the Chinese characters “神髪彦(カムイオトプシ)の.” We note that again the ruby text is allowed to continue alongside a character that is not being

glossed.

Figure 5. Kindaichi Kyosuke, editor and translator. 1936. Ainu jojishi yūkara アイヌ叙事詩ユーカラ [Yukar:

Ainu Epics], p. 219. Tokyo: Iwanami Publishers.

15

The next example is double-sided. In this example (gure 6), “⼤王(おおきみ)(だいおう),” thepreferred reading ōkimi is presented as the top ruby text and another reading, daiō, is presented

parenthesized as a bottom-sided ruby. It should be noted that, as this is a textbook of Japanese
history for Japanese junior high schools, it has numerous interlinear glosses, birth and death years

Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference9Rubi as a Text

for example. However, these glosses are not tied with a particular text, but just function as pointers,
explanations, or something else. We consider them not to be ruby glosses, but general annotations
that fall under the semantics of <note>.
Figure 6. Ishii Susumu, Gomi Fumihiko, Sasayama Haruo, and Takano Toshihiko, editors. 2007. Shōsetsu
nihonshi 詳説⽇本史 [Advanced Japanese History], p. 21. Tokyo: Yamakawa Shoten.

16

Lastly, although not yet conrmed by a real example, a double-sided ruby could overlap andnot nest. In a blog entry discussing complex ruby structures and their encodings, Uchida cites aconstructed example presented by a now-deleted tweet:

まず、 @koueiheiさんによるルビの例。「労働者階級意識」といふ親⽂字列のうち、「労働者階級」に「プロレタリアート」といふルビ。同時に「階級意識」に「かいきゅういしき」といふルビ。これは⼊れ⼦⽅式ではマーク付けできない。

もっとも、⽇本語でも英語でも「階級」と「意識」は2つの単語に分解できるんぢゃ

ないか、したがって無理にcomplex rubyで扱ふ必要な無いんぢゃないか、といふ指摘もあらう。

(Uchida 2010)
Twitter user @koueihei (who had deleted their account at the time of writing) oers a glossed textthat reads “労働者階級意識” —a phrase that is dicult to translate. In this example, @koueihei

has added two ruby glosses: プロレタリアート (Proletariat) to the (upper?/right?) side of “労働者階級,” and “かいきゅういしき” to the (bottom?/left?) side of “階級意識” (translation ofKlassenbewußtsein or class consciousness). The double-sided ruby could be visualized as in eithergure 7 or gure 8.

Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference10

Rubi as a Text

Figure 7. A possible rendering of an example in Uchida (2010), where the vertical bar shows morphemeboundaries. In this variant, the bottom-side ruby corresponds with word divisions.

Figure 8. Another rendering of ﬁgure 6. In this variant, the bottom-side ruby corresponds with morpheme
divisions.

17

According to Uchida, word-to-morpheme alignment, as shown in gure 7, cannot be represented
using nested structure. It is true, as Uchida also points out, that the glossed text consists of threemorphemes, and that it does not need to encode both rubies as a single ruby gloss structure, as we
can see from the glossing boundaries in gure 8. It is enough then to encode both rubies at theboundary of “階級” and “意識,” meaning that it is not necessarily an encoding problem. However,
we can imagine a case where the left/bottom-side ruby was Klassenbewußtsein, and hence remains

a problem for nested encoding. In any case, this example is surely one of the rarest structures
among ruby glosses. But it is theoretically possible, and the possibility that examples will emerge
warrants consideration of encoding strategies that can handle them.

Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference11

Rubi as a Text

3.2 Historical Japanese Ruby Glosses
18

Historical ruby glosses are not too distant from modern ruby glosses. Ruby is originally derived
from interlinear glosses to Classical Chinese texts, or Kanbun Kundoku (漢⽂訓読).5 A summaryof the application of Japanese glosses to Classical Chinese texts can be found in Whitman (2011)

and Kosukegawa (2014). See Whitman (2011) for a comparison with glosses in Latin manuscripts.
Kosukegawa (2014) summarizes the Japanese glossing practice as follows:1.

The source texts of kundoku glossing were in classical Chinese.

2.

…

3.

Kundoku involves the act of directly adding glosses to a classical Chinese text.

4.

The method of adding glosses has both similarities and dierences in each Sinoxenic
language.6(Kosukegawa 2014, 1)
The third point is particularly relevant to the ruby phenomenon. Here Kosukegawa (2014)translates the summarization of the Japanese glossing practice by Ishizuka (2001, 2) as “addingof annotations or symbols to aid in the comprehension of a classical Chinese [text] while readingit.” The purpose of glossing, not translating, is to preserve the original glossed text as it is. The
purpose of Japanese ruby is practically the same: to leave the intended graphic expression in theglossed text while conveying the meaning.
19

What distinguishes ruby glosses from glosses to the Classical Chinese text is that ruby glosses
are applied to text in the same language. Yada (2018) identies the earliest ruby gloss from latetwentieth-century materials. Konno (2009, 93) demonstrates that B-e–type ruby glosses can beattested as early as the sixteenth century. Such glosses are as a rule not later additions but glosses
by the authors themselves (see also Yada 2018, 803).

20

Double-sided ruby glosses ourished between the eighteenth and nineteenth centuries, when
the Tokugawa Shogunate ruled the nation. Murakami (2017) claims that those double-sided
ruby glosses emerged from the Sinological practices of Ogyū Sorai (1666–1728), who valued
understanding texts through the living vernacular language rather than the vernacular-glossed
Classical Japanese language. According to Murakami (2017), while the right side of the ruby gloss

Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference

12Rubi as a Text

generally shows the pronunciation, the left side of the ruby gloss is a vernacular explanation of
the glossed text.7 Murakami’s (2017) argument is important to account for the question as to why
the complex glosses to Classical Chinese texts turn into the more modern double-sided rubies: theold glosses, sometimes successively accumulating, as a rule show independent interpretations andhave nothing to do with position; in contrast, Sorai’s double-sided ruby glosses are systematically
positioned. Sorai’s double-sided ruby glosses are intended to explain Classical Chinese texts inthe vernacular Japanese language, and the same motivation lies behind double-sided rubies inJapanese texts.
21

Explanatory vernacular glosses also developed during the days of the Tokugawa Shogunate.8 In
a limited timeframe from the eighteenth to the nineteenth century, publications for the generalpublic in which most Chinese characters were glossed appeared widely. Yanaike (2009) claims thatsuch glosses, rather than the glossed text itself, were what people actually read. Such blanket useof glossing was demanded because of the Japanese population’s low literacy in Chinese characters,
and was possible because of printing: almost all Japanese publications were produced using
woodblock printing. Only in the last decade of the nineteenth century did movable type printing
supersede woodblock printing. The ruby gloss became uneconomical in movable type printing,and the introduction of modern compulsory education reduced the need for the glosses.

22

The example below is a page from an early modern text, Hanabusa sōshi (gure 9). It is written top
to bottom and right to left. Here, the line on the far left is to be transcribed:にむかひ梁(りやう)武帝(ぶてい)の仏(ぶつ)に淫(いん)して⺠膏(みんかう)(たみのあぶら)を費(ついや)し国の衰(おとろ)へとなり(Tsuga Teishō. (1749). Hanabusa sōshi 英草紙. Vol. 1, f. 3r. doi:10.20730/200016727.)

Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference13

Rubi as a Text

Figure 9. Tsuga Teishō. (1749). Hanabusa sōshi. Vol. 1, f. 3r. doi:10.20730/200016727.

Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference14

Rubi as a Text

National Institute of Japanese Literature, Japan. CC BY-SA 4.0.

In this example, a sequence of two characters ⺠膏, or the wealth of the people, is doubly glossed,
being Sino-Japanese reading in an old-fashioned spelling “minkō みんかう” (cf. Mandarin míngāo): (1) on the right side, with the native word explanation “tami no abura たみのあぶら” and (2)on the left side. The left-side gloss, which literally means “the fat of the people,” is a rather literal
rendition of the glossed characters, meaning that it explains the characters rather than the word.
23

The next example is taken from a Japanese song, Igirisu dodoitsu (gure 10, written top to bottom
and right to left). The rst line has triple ruby glosses:
まことリットル(りつとる)(少(すくな)き)(Bōan Koikoi Sanjin. Late 18c. Gengo chūkai igirisu dodoitsu⾔語注解英語⼟渡逸. Vol. 1, f. 1v.
doi:10.20730/200018433.)

Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference15

Rubi as a Text

Figure 10. Bōan Koikoi Sanjin. Late 18c. Gengo chūkai igirisu dodoitsu. Vol. 1, f. 1v. doi:10.20730/200018433.

Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference16

Rubi as a Text

National Institute of Japanese Literature, Japan. CC BY-SA 4.0.

In this example, the left-side gloss is itself glossed. The glossed text (1), in katakana script, is arendition of “little.” An equivalent transcription in hiragana is given in the right-side ruby gloss(2), and a translation is given in the leftmost left-side ruby gloss (3). To the best of our knowledge,
such complicated ruby glosses appear initially in the late eighteenth century and again briey,around 1870. Although not unlikely in other eras, technically speaking a deeper gloss is possible.
As TEI is intended for documenting rather than creating, we believe that a ruby schema should becapable of encoding historical examples as long as it does not complicate the schema itself.

3.3 Ruby-Like Interlinear Glosses in Other Writing Systems: An Example
from Taiwanese Bopomofo
24

There is another writing system, besides the Japanese system, that has ruby-like glosses:

bopomofo, used in Taiwan. Bopomofo, or the Zhùyīn Fúhào 注⾳符號 system, is a transcription

system for Mandarin Chinese and other Chinese languages. Bopomofo was learned in order to gloss
phonetically from Japanese kana, so we consider it one of the ruby gloss systems.
25

Bopomofo has unique characteristics in ruby text positioning. It allows both top and right sides of
the glossed text in horizontal writing, meaning that its default value for the ruby text position is
not denable (Ministry of Education 2000; note that the right-hand position in horizontal writing
is preferably called intercharacter position, a counterpart to the term interlinear position). The
function of bopomofo, reecting the monosyllabic nature of the Chinese language, is mostly topresent the phonetic value of a glossed character. Metaphorical usage may technically arise, but
it does not change the structure of bopomofo.

Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference17

Rubi as a Text

Figure 11. Horizontal right-sided (intercharacter) bopomofo example on the street.

nesnad.
In

2016.

Wikimedia“File:Bopomofo
Commons.

on

Taiwanesestreet-with

English

-

Nov

2016

2.jpg.”

https://commons.wikimedia.org/wiki/File:Bopomofo_on_Taiwanese_street_-_with_English_-_Nov_2016_2.jpg
26

Similar examples can be obtained from schoolbooks used in mainland China, but not as frequently
as in Taiwan. In Korea and Vietnam, similar vernacular reading aids were applied to words ofChinese origin written in Chinese characters before modern writing systems emerged. The TEI
ruby gloss encoding schema will help to encode Korean and Vietnamese texts with such glosses.

4. Conceptualization of the Structure
4.1 Earlier Proposed Schema and Encoding Models: Japanese Cases
27

The ruby gloss has long been a problem for Japanese text encoding. Within the XML framework,
Hara and Yasunaga (2002) were among the rst to address this problem. Their scope was, however,limited to the simple single-sided ruby. It is practically the same with Yamaguchi et al. (2011),
whose goal was to build an XML vocabulary for Japanese linguistic corpora. They treated ruby text
as an attribute for the ruby gloss element, which is useful only for the phonation gloss (types Aa, A-b).

28

Such a simple structure works for most ruby glosses, but faces numerous problems. Taking an
example from corpus building, if ruby text is going to be analyzed, how can it be described? It is
impossible to tag an attribute value for a ruby text in XML. In fact, Murayama, Ogiso, and Nakamura(2017), building on the work of Yamaguchi et al. (2011), describe their diculties in handling thesevalues in their environment. In the same vein, a double-sided ruby can be described only as long as
the ruby gloss element is allowed to nest, and the ruby text refers to the same glossed text. Kawase,
Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference18

Rubi as a Text

Ichimura, and Ogiso (2013) attempted to introduce a TEI framework based on Yamaguchi et al.
(2011). They were aware of this problem, and introduced HTML’s ruby vocabulary while callingfor a more sophisticated structural approach in TEI. Later, Murayama, Ogiso, and Nakamura (2017)
addressed this issue by introducing a new nesting left-side ruby element to their own schema.
Cong and Takaku (2018) also introduce HTML’s ruby vocabulary to the TEI framework. However,HTML is not intended for documentation of the text, and this is a crucial limitation. Cong and
Takaku (2018) also marked up ruby texts character by character, rather than at the morphemic
level, which would break up the logical relationship of ruby and glossed text.
4.1.1 HTML’s Ruby Schemas
29

The history of ruby encoding in HTML is marked by pro- and anti-SGML (XML) positions on
structure. A ruby encoding system was rst proposed in the earliest draft of W3C (2001) (which
eventually became a module of XHTML 1.1),9 in late 1998, and implemented in 1999 by Microsoft
informally in their Internet Explorer 5. In its earliest form, W3C (2001) accommodates only singlesided ruby; however, the nal form also covers double-sided ruby. The published form denes
the envelope <ruby> element, the container elements <rb>, <rt>, and respective <rbc> and <rtc>elements as the containers of <rb>s and <rt>s, with the compatibility-easing <rp> element, whoserole was to give parentheses to unsupported implementations. One thing to note is that the rst
draft, which was produced during the transition from HTML to XHTML, allowed the omission of
the end tags of <rb> and <rt>, but reversed that in the nal form. However, the Internet Explorer
implementation was based on an earlier draft of this document, and they did not follow the later
version. This gap between W3C and implementers, although not limited to this small corner,has continued to cause practical issues until now, although W3C abandoned their developmentof XHTML 2.0. Another thing worth mentioning is that, in this schema, <rb> was allowed once
per <ruby> element, and not allowed under the <rbc> element (see W3C 2013 for a comparison
between approaches in XHTML and HTML5); therefore, if an encoder wished to divide the rubytext character by character (as shown in the examples of gures 2, 3, and 4), they needed to tag
every unit of ruby-text correspondence, and ignore the semantic unit.

30

As an extension to HTML5, W3C (2014) set out to create ruby encoding that met the requirementsof W3C (2012) with the styling component covered by CSS3 modules.10 This extension addressed
the gap noted in W3C (2013), which investigated the ways in which W3C (2012) was insucient
Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference19

Rubi as a Text

to meet ruby-related criteria. Based on JISC (2004), W3C (2012) had tried to show the traditional
typography standard that should be realized in modern browsers (Yabe 2010). In contrast with
xed layout settings, where traditional typography has worked, it was not an easy task toaccomplish this in content-ow layout; content-ow allows adjusting the layout to t everythingfrom smart-phone browsers to large monitors for desktop PCs. Ruby glosses present a number ofchallenges for content-ow layout; to name but two examples: How and at what distance fromthe glossed text should ruby text be rendered, given a limited allotted boundary? What if a line
break occurs in the middle of the ruby gloss? Kawabata (2014) reviews diculties in renderingruby glosses properly in dierent versions of HTML.
31

The encoding models that were adopted in HTML5 (and those inherited by WHATWG’s HTML
Living Standards) have, in principle, a tabular structure and an interleaving structure. Each has
its own strength and weakness, in terms of logical structure. The interleaving structure provides
a simple parsing mechanism and conforms to desktop publishing implementations. Most actualHTML encoding tends to take this approach. However, since not a few Japanese words have two
or more Chinese characters to be represented, it breaks up the logical word structure and hinders
deeper encoding. In contrast, the tabular structure is more intuitive, but the repetition of the same<rb> or <rt> tags would cause ambiguity in encoding, especially when the numbers of <rb> and<rt> tags dier. As both <rb> and <rt> are content elements in their own right, they prioritizepresentation functions at the expense of their original logical structure.
32

The double-sided ruby, termed complex ruby in HTML schemas, is modeled using both anested structure and a boxed structure. The nested structure gives a simpler and more exible
representation of the structure. The boxed structure creates a table layout within which details
are lled in. One weakness of the nested model is that it cannot handle some overlapping cases,
as discussed by Uchida (2010). However, from the viewpoint of stand-o versus inline markup,
this problem is rooted in a limitation of inline markup in XML. HTML5 addresses this problem byallowing empty <rt> elements (Ishida 2016). In the context of the TEI Guidelines, blank elements
can be replaced by linking elements.

Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference20

Rubi as a Text

4.1.2 Our Proposed Schema and Encoding Model
33

As we have seen, the HTML encoding schemas were designed principally to allow ruby to berendered in browsers. But TEI is concerned principally with meaning, not rendering. Therefore,
for the TEI schema, it was necessary to invent a new model for descriptive encoding. TEI has
not only introduced a nested ruby gloss element, but also provided a stand-o mechanism forcorrespondence between spans of ruby and glossed texts.

34

Our conception was, basically, that the schema should allow maximum exibility through a simple
model. In particular, while we allow nesting of the ruby gloss element (similar to the parallel
segmentation method used in a critical apparatus), we also allow, if necessary, the double-endpoint-attached method in order to accommodate the most complex examples, which require theuse of <anchor>.11 We do not nd convincing reasons for maintaining multiple encoding strategies,
and for the reasons discussed above, we avoid employing either the interleaving structure or theboxed structure.

4.2 Encoding Examples
35

The following examples show how our proposal addresses the examples discussed above.
4.2.1 Modern Japanese Ruby Glosses
Example 1. “真⾯⽬(ま/じ/め)” .
<p><ruby><rb><anchor xml:id="ma"/>真<anchor xml:id="ji"/>⾯<anchor xml:id="me"/>⽬</rb>rt><rt><anchor target="#ma"/>ま<anchor target="#ji"/>じ<anchor target="#me"/>め</</ruby></p>

Example 2. “浴⾐(ゆかた)” .
<p><ruby><rb>浴⾐</rb><rt>ゆかた</rt></ruby>Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference21

Rubi as a Text</p>

Example 3. “あんたの鼾(いびき)” .
<p>あんたの <ruby><rb>鼾</rb><rt>いびき</rt></ruby></p>

Example 4. “神髪彦(カムイオトプシ)の” .
<p><ruby><rb>神髪彦</rb><rt xml:lang="ain">カムイオトプシ</rt></ruby>の </p>

Example 5. “⼤王(おおきみ)([だいおう])” .
<p><ruby><rb><ruby><rb>⼤王</rb><rt place="top">おおきみ</rt></ruby></rb><rt place="bottom">（だいおう）</rt></ruby></p>

Example 6. “労働者階級意識” .
<p><ruby><rb xml:id="rb1">労働者<anchor xml:id="rb1-1"/>階級<anchor xml:id="rb1-2"/>意識<anchor xml:id="rb1-3"/></rb><rt from="#rb1" to="#rb1-2" place="left">プロレタリアート</rt><rt from="#rb1-1" to="#rb1-3" place="right">かいきゅういしき</rt></ruby>Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference22

Rubi as a Text</p>

4.2.2 Historical Japanese Ruby Glosses
Example 7. Example from Hanabusa soshi.
<p>にむかひ<ruby><rb>梁</rb><rt>りやう</rt></ruby><ruby><rb>武帝</rb><rt>ぶてい</rt></ruby>の<ruby><rb>仏</rb><rt>ぶつ</rt></ruby>に<ruby><rb>淫</rb><rt>いん</rt></ruby>して<ruby><rb><ruby><rb>⺠膏</rb><rt place="right" type="primary">みんかう</rt></ruby></rb><rt place="left" type="secondary">たみのあぶら</rt></ruby>を<ruby><rb>費</rb><rt>ついや</rt></ruby>し国の<ruby><rb>衰</rb><rt>おとろ</rt></ruby>へとなり </p>

Example 8. Example from Igirisu dodoitsu.
<l>まこと<ruby><rb><ruby><rt place="right">りつとる</rt><rb>リットル</rb>

Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference23

Rubi as a Text</ruby></rb><rt place="left"><ruby><rb>少</rb><rt place="right">すくな</rt></ruby>き</rt></ruby></l>

4.2.3 Bopomofo
Example 9. Example of bopomofo.
<tagsDecl><rendition selector="rt" scheme="css"> ruby-position: inter-character; /*making use of editor’s draft CSS 3 module, CSS Ruby Annotation Layout
Module Level 1 */ </rendition></tagsDecl> … <p><ruby><rb>牆</rb><rt>ㄑㄧㄤˊ</rt></ruby><ruby><rb>⾯</rb><rt>ㄇㄧㄢˋ</rt></ruby><ruby><rb>請</rb><rt>ㄑㄧㄥˇ</rt></ruby><ruby><rb>勿</rb><rt>ㄨˋ</rt></ruby><ruby><rb>攀</rb><rt>ㄆㄢ</rt></ruby><ruby><rb>爬</rb><rt>ㄆㄚˊ</rt></ruby>，</p>Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference24Rubi as a Text

4.3 Some Remarks on Encoding Strategy
36

Some additional comments are worth making. First, in the case of double-sided ruby glosses
encoding, if the order of priority is apparent, lower-priority glosses should be encoded in theshallower level and have a @type for both <rt>s; their respective values should be something like"primary" and "secondary" in the working language of the encoding project (see example 7; inthis case, the right-sided ruby gloss is encoded in a shallower position than the left-sided one).12
If the order is not apparent, encoders should treat them in a consistent manner. Second, in a
writing system where the default value of the ruby text position cannot be xed, documenting it in<tagUsage> and <rendition> may be helpful (see example 9). Third, the correspondence between

layouts of the ruby and glossed texts should be made clear with the aid of the <anchor> element.13
In an HTML context, reecting a perception that ruby text is glossed per character, encoders may
wish to encode example 1 as follows (example 11):
Example 11. Not recommended encoding example of “真⾯⽬(ま/じ/め)”.
<p><ruby><rb>真</rb><rt>ま</rt><rb>⾯</rb><rt>じ</rt><rb>⽬</rb><rt>め</rt></ruby></p>

Such a structure is not prohibited, but it prevents users from further analyzing and encoding theruby and the glossed text.
37

The new schema permits the encoding of complex ruby glosses. Ruby glosses can be nested, andadjusted for unusual spanned alignment, making it possible to encode triple ruby glosses andthe nonnested glosses. It has also a downside in that these most complex ruby glosses cannot bedirectly translated into HTML, the most widely used ruby gloss encoding schema. In addition, thedefault ruby position cannot be xed. Thus, every encoding project should use @place to specify
a desired output.

Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference25

Rubi as a Text

5. Conclusion38

Our goal has been to describe the rationale for introducing to the TEI Guidelines a schema that fully
accommodates the rich structure of ruby. This richness, as presented in Ariga (1989, 332), is seenin an 1874 essay by a Japanese author where the text is written in Classical Chinese but expected

to be read with detailed accompanying glosses in Japanese. In the dialog a Chinese word 鄙吝 bǐlìn
(in Sino-Japanese form, birin), or stingy, was transformed into Japanese slang kechinbō ケチンボー

using an unusual ruby gloss to give a vivid tone to a formal narrative. (See also Takashi Wilkerson
and Wilkerson 2000 on the playfulness of contemporary ruby.) Our proposal was to allow such astructure to be encoded in conformance with the Guidelines.
39

Such inclusion of localized meaning not only takes a great step toward fully including a local
textual tradition but also gives the TEI community a way to contribute to the global humanities
by encouraging the inclusion of other underrepresented textual traditions. We hope this proposal
encourages introducing other underrepresented local textual structures into the Guidelines.

BIBLIOGRAPHY
Ariga, Chieko. 1989. “The Playful Gloss: Rubi in Japanese Literature.” Monumenta Nipponica 44(3): 309–35.
doi:10.2307/2384611.
Cong, Yan, and Masao Takaku. 2018. “Tōshi sakuhin no honbun furu tekisuto ni taisuru TEI mākuappushuhō no teian 唐詩作品の本⽂フルテキストに対するTEIマークアップ⼿法の提案 [A Proposal of

TEI Markup for the Content of Tang Poems].” Jōhō chishiki gakkai shi 情報知識学会誌 [Journal of Japan
Society of Information and Knowledge] 28(2): 174–85. doi:10.2964/jsik_2018_017.

Dürst, Martin J. 1997. “Ruby in the Hypertext Markup Language.” Internet draft. https://www.w3.org/
International/draft-duerst-ruby-01.
Estill, Laura. 2016. “Encoding the Edge: Manuscript Marginalia and the TEI.” Digital Literary Studies 1(1).
https://journals.psu.edu/dls/article/view/59715.

Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference26

Rubi as a Text

Hara, Shōichirō, and Yasunaga, Hisashi. 2002. “Kokubungaku kenkyū shien no tame no SGML/XML dēta
sisutemu: Kokubungaku dēta kyōyū no tame no hyōjunka 国⽂学研究⽀援のためのSGML/XMLデー

タシステム: 国⽂学データ共有のための標準化 [SGML/XML Data System for Japanese ClassicalLiterature: Standardization for Literacy Resource Sharing].” Jōhō chishiki gakkai shi 情報知識学会誌[Journal of Japan Society of Information and Knowledge] 11(4): 17–35, 46. doi:10.2964/jsik_KJ00001039453.

Ishida, Richard. 2016. “Ruby Markup.” W3C Internationalization. Last updated July 18, 2016. https://www.w3.org/International/articles/ruby/markup.en.

Ishizuka, Harumichi. 2001. “Sōron 総論 [General Remarks].” In Kuntengo jiten 訓点語辞典 [A Linguistic
Dictionary of Kunten Materials], 1–2. Tokyo: Tokyodō.

JISC (Japan Industrial Standard Committee). 2004. JIS X 4051: Nihongo bunsho no kumihan hōhō ⽇本語⽂書の組版⽅法 [Formatting Rules for Japanese Documents]. Tokyo: Japanese Industrial Standards Committee.

Kawabata, Taichi. 2014. “HTML no rubi hyōjunka no genjō to kadai HTMLのルビ標準化の現状と課題[Current Status and Issues in HTML’s Ruby Standardization].” Journal of Japan Association for East Asian Text
Processing 15: 4–15.

Kawase, Akihiro, Taro Ichimura, and Tomonobu Ogiso. 2013. “TEI P5 ni motozuku kinsei kōgo shiryō no kōzōka
to sono mondaiten TEI P5に基づく近世⼝語資料の構造化とその問題点 [Problems in TEI P5 Encoding

on Colloquial Japanese Documents of the Early Modern Period].” In Jinmonkon 2013 ronbunshū じんもんこん2013論⽂集 [Proceedings of the Computers and Humanities Symposium JinMonCom 2013], 7–12. Tokyo: Jōhōshori gakkai. http://id.nii.ac.jp/1001/00096389/.

Konno, Shinji. 2009. Furigana no rekishi 振仮名の歴史. Tokyo: Shueisha.

Kosukegawa, Teiji. 2014. “Explaining What Kundoku Is in the Premodern Sinosphere.” In Lecture vernaculairede textes classiques chinois / Reading Chinese Classical texts in the Vernacular, edited by John Whitman andFranck Cinato. Dossiers d’HEL (electronic supplement to the journal Histoire Épistémologie Langage) 7.
http://shesl.org/index.php/dossier7-lecture-vernaculaire/.
Ministry of Education. 2000. The Manual of the Phonetic Symbols of Mandarin Chinese. Taipei: Ministry of
Education. https://language.moe.gov.tw/001/Upload/les/site_content/M0001/juyin/index.html.

Murakami, Masataka. 2017. “Kunyaku iwayuru hidari rubi o megutte 訓訳 いわゆる左ルビをめぐって [OnKun’yaku (Colloquial Japanese Glosses in báihuà Novels)].” In Nihon kindaigo kenkyū 6, edited by Modern
Japanese Language Research Association, 87–106. Tokyo: Hitsuji shobō.
Murayama, Miwako, Toshinobu Ogiso, and Takenori Nakamura. 2017. “Keitairon jōhō no tajūka ni yoru

sharebon kōpasu no shitsuteki kakuchō 形態論情報の多重化による洒落本コーパスの質的拡張[Qualitative Expansion of the Sharebon Corpus using Multilayer Morphological Information].” Jōhō shorigakkai kenkyū hōkoku 情報処理学会研究報告 [IPSJ SIG Technical Report] 2017-CH-114 (8): 1–8. http://
id.nii.ac.jp/1001/00178697/.

Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference27

Rubi as a Text

Nagasaki, Kiyonori, Satoru Nakamura, Makoto Tanaka, Masato Nishikawa, Ryūju Hayashi, Keijun Inoue, andMasahiro Shimoda. 2022. “Kōzōka tekisuto dēta no katsuyō ni okeru genjō to kadai: TEI ni junkyo shita

Jōdo Shinshū Seiten Zensho zenbun kensaku shisutemu no kaihatsu o tsūjite 構造化テキストデータの活⽤における現状と課題: TEIに準拠した『浄⼟真宗聖典全書』全⽂検索システムの開発を通じて [Current Status and Issues in Utilization of Structured Text Data: Development of a Full-Text Search
System for TEI-Compliant Buddhist Scriptures].” Jinmonkon 2022 ronbunshū じんもんこん2022論⽂集[Proceedings of the Computers and Humanities Symposium JinMonCom 2022] 73–78. Tokyo: Jōhō shori gakkai.
http://id.nii.ac.jp/1001/00223165/.
Ōshima, Chūsei. 1989. “Hyōki shutai no hyōki mokuteki kara mita kanji kana heiretsu hyōki: Iwayuru furigana
tsuki hyōki keishiki o megutte 表記主体の表記⽬的から⾒た漢字仮名並列表記: いわゆる振り仮名付き表記形式をめぐって [Kanji-kana Paralleled Orthography with Emphasis on the Intention of theAgent of Writing: The So-Called Orthography with Furigana].” Dōshisha Joshi Daigaku gakujutsu kenkyū

nenpō 同志社⼥⼦⼤学学術研究年報 [Doshisha Women’s College of Liberal Arts Annual Reports of Studies] 40(4): 440–54.

Seeley, Christopher. 1991. A History of Writing in Japan. Leiden: Brill.
Takashi Wilkerson, Kyoko, and Douglas Wilkerson. 2000. “The Gloss as Poetics, Transcending the Didactic.”
Visible Language 34 (3): 228–63.
TEI Consortium. 2021. TEI P5: Guidelines for Electronic Text Encoding and Interchange. Version 4.2.0. Last updated
on 25th February 2021, revision 736c0acf0. N.p.: TEI Consortium. https://tei-c.org/Vault/P5/4.2.0/doc/
tei-p5-doc/en/html/.

Uchida, Akira. 2010. “Yahari HTML5 niwa complex ruby ga hitsuyō dewa naikaやはりHTML5にはcomplex
rubyが必要ではないか [Isn’t HTML5 Still Necessary for Complex Ruby?],” Nihongo renshūchū ⽇本
語練習⾍ [A Bug in Training Japanese Language Skill] (blog). July 4, 2010. http://uakira.hateblo.jp/

entry/20100704.

Whitman, John. 2011. “The Ubiquity of the Gloss.” SCRIPTA 3: 95–121.
W3C. 2001. Ruby Annotation. W3C Recommendation. May 31, 2001. https://www.w3.org/TR/2001/RECruby-20010531/.
———. 2012. Requirements for Japanese Text Layout. W3C Working Group Note. April 3, 2012. https://www.w3.org/TR/2012/NOTE-jlreq-20120403/.
———. 2013. Use Cases & Exploratory Approaches for Ruby Markup. W3C Working Group Note. October 8, 2013.
https://www.w3.org/TR/ruby-use-cases/.
W3C. 2014. HTML Ruby Markup Extensions . W3C Working Group Note. February 4, 2014. https://www.w3.org/TR/html-ruby-extensions/.

Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference28

Rubi as a Text

Yabe, Masafumi. 2010. Katsuji to arufabetto: Gijutsu kara mita nihongo hyōki no sugata 活字とアルファベット:

技術から⾒た⽇本語表記の姿 [Movable Types and the Alphabet: The Japanese Writing System Seen ThroughTechnologies]. Tokyo: Hōsei daigaku shuppankyoku.

Yada, Tsutomu. 2018. “Furigana.” In Nihongogaku daijiten, edited by The Society for Japanese Linguistics, 802–
3. Tokyo: Tokyodō.
Yamaguchi, Masaya, Tomokazu Takada, Masanori Kitamura, Yōko Mabuchi, Ōshima Hajime, Kobayashi
Masayuki, Nishibe Michiru, et al. 2011. “Gendai nihongo kaki kotoba kinkō kōpasu” ni okeru denshika fōmattover. 2.2 『現代⽇本語書き⾔葉均衡コーパス』における電⼦化フォーマット ver. 2.2 [Digitization and
Encoding Rules for the Balanced Corpus of Contemporary Written Japanese]. Tokyo: NINJAL.

Yanaike, Makoto. 2009. “‘Sō rubi’ no jidai: Nihongo hyōki no jūkyū seiki 「総ルビ」の時代: ⽇本語表記の⼗九世紀 [An Era of Sō Rubi: The Nineteenth Century in the History of the Japanese Writing System].”Bungaku ⽂学 [Literature] 10 (6): 117–30.

NOTES
1

This paper was originally submitted to jTEI before submission of the proposal to the TEI-C

Technical Council. In the course of editing, we have tried to reect the outcome, but it is not
the object of this paper to describe the underlying discussions. To prevent confusion with our
proposed schema and the ocial schema, we decided to omit, or move to footnotes, part of the
discussion related to the schema that we originally proposed. For details of the original schema andrelevant discussion within the TEI community, see GitHub issues https://github.com/TEIC/TEI/
issues/2054 and https://github.com/TEIC/TEI/issues/2109. The authors wish to express sincere
gratitude to the Technical Council, and especially Martin Holmes, who enthusiastically advocatedfor the proposal’s acceptance into the Guidelines and polished the details. Without him, theproposal would not have been committed so promptly. Holmes and Syd Baumann kindly tested,modied, and rened our proposal and edited the Guidelines based on our proposal. For details,
see the dedicated repository on GitHub (https://github.com/martindholmes/rubyForTEI).
2

This is a pattern playing with ambiguity. In the rst example, ラビリンス, a Japanese renderingof ‘labyrinth,’ is what the author wished to show as a text. It is foreign (or rather to say ‘exotic’) toJapanese people, and the author decided to gloss the word, choosing the Chinese-origin synonym
迷宮 (mígōng). However, applying usual kana glosses here is not preferred because the gloss

employs Chinese characters rather than standard Japanese orthography. At the same time, Chinese
Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference29

Rubi as a Text

characters placed in a gloss are not always legible. Thus, the placement in this example wasreversed: 迷宮 is on the text side, and ラビリンス is on the gloss side. Another motivation isthat, following an older tradition, what is glossed should be Chinese characters. Ōshima’s (1989)
viewpoint is on the role of the glossing in question, so the ‘counterpart’ explanation is enoughat the moment. An English equivalent could be to mark the phrase ‘lol’ with the gloss ‘heartylaughter,’ or ‘vir’ with the gloss ‘a brave man.’
3

Translation ours with slight modications in numbering and illustrations.

4

Generally speaking, in the Japanese writing system, one kanji denotes a single morpheme orsyllable. However, there are cases where two or more characters denote a single morpheme, which
could be termed a complex-orthography word. There are a number of typographic considerations
involved in the composition of ruby glossed text. However, this does not mean that they present
logical complexities, which is the focus of the TEI proposal, and so diers from the W3C’s (2012)
conception of the ruby glossed text.
5

Although the Japanese writing system adopts Chinese characters, the way it uses them cannot

be summarized in a sentence. Roughly speaking, the major categories of Chinese characters in
the Japanese writing system fall into Sino-Japanese and native strata. The Sino-Japanese stratum
represents the adaptation of Chinese pronunciation, whereas the native stratum represents
renditions of the Chinese language, in which a character generally represents a word or a syllable.
The complexity of these reading strata also contributed to the development of interlinear glosses
as a part of the writing system. Ateji, or “phonogram usage of Chinese characters” (Seeley 1991,188), is the most related to the need for ruby in Japanese texts. As ateji strips the characterin question of its semantics, it can be ambiguous without the aid of a ruby gloss. For example,
urayamashii, or “to be jealous,” has been written in numerous ways: a more recent rendition prefers“羨しい,” compared with Chinese xiànmù 羨慕, or “to be jealous,” but older renditions employedateji as in 裏⼭敷い, where all three Chinese characters denote solely their phonetic value. Anotherdevice which deserves to be taken into account is jukuji kun, a native reading for a set of Chinesecharacters. As its name suggests, jukuji kun provides a reading in cases where a sequence of thenative reading for each character would not be adequate for a set of characters. For example, arendition for the Chinese word zuórì 昨⽇ is kinō and not the Japanese equivalent saki no hi. This

Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference30

Rubi as a Text

also makes it dicult to read a text in a consistent way, and is helpfully shored up by a ruby gloss.
The heavy use of the ruby gloss in the Japanese writing system emerged from such polyvalent
Chinese character readings.
6

Any language that has a tradition of reading Chinese characters is called Sinoxenic. Sinoxenic

languages include Sino-Japanese, Sino-Korean, and Sino-Vietnamese.
7

We do not say much about the practice of glossing Classical Chinese texts. However, it should

be noted that, prior to Sorai, nonstandard glosses had long been practiced in Chinese character
dictionaries and in formal texts such as the Chronicle of Japan, written in Classical Chinese, which
Japanese readers have long preferred to read in its articial archaic language (Konno 2009, ch.
2). As for the Chinese character dictionaries, since a Chinese character can have a number of
equivalents, more than ten glosses may appear, whereas they are not part of a running text. We
do not see any rationale for treating them as a kind of ruby gloss, as in Konno (2009). Glosses toClassical Chinese texts are in the semantic tradition of interlinear glosses.
However, a modern rendition of a gloss of a Classical Chinese text can pose issues since it sometimes
distinguishes agglutinative endings for a word root (or a stem) by the choice of two types of kana.
See Cong and Takaku (2018) and Nagasaki, et al. (2022) for further discussion.
8

This practice was a fruit of the adaptation of Chinese vernacular-inuenced literature, calledbáihuà wénxué ⽩话⽂学. The adopters wished to show traces of adaptation by rendering Chinese

words as they were written, but at the same time, they wanted them to be read in Japanese
discourse: they could imitate the old glossing method to show their intended reading while
showing the Chinese words in Chinese characters. In this way, ruby glosses became important forreading the text.
9

As acknowledged in W3C (2001), their work was inspired by Dürst (1997), in which ruby glosses

were encoded as attributes.
10 As for the encoding model after HTML5, note well that before W3C (2013) was published,
HTML5 dropped <rb>, claiming that the base text element was unnecessary because the children
text nodes of <ruby> necessarily were the base text. See https://www.w3.org/Bugs/Public/
show_bug.cgi?id=10830 for details. Thus, it is not clear why W3C (2014) reintroduced the use of

Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference31

Rubi as a Text

<rb> and <rtc> elements. However, as they were declared optional, the dierence may not be

as large as may appear. At any rate, current HTML standards have not fully reintroduced theseelements.
11 In the original proposal, there was a limit of one <rb> and one <rt> element per <ruby> element
so as to force a nesting structure. However, it was pointed out that Taiwanese bopomofo rubysometimes uses bopomofo and pinyin annotations simultaneously, and that they should not betreated as nested. To address this, the constraint was not included in the Guidelines.
12 In our original proposal, @type was allowed for the <ruby> element and required when nested.
However, it is not always apparent which side of a ruby gloss is primary. In addition, having a @type
attribute on the <rt> element is considered more intuitive.
13

Descriptions in the TEI Guidelines, chapter 3.4.2 dier somewhat in details. When encoders

divide some glossed text with <anchor>, the Guidelines encourages the user to specify
correspondence by dividing up their respective ruby glosses as well. The reason we maintain our
original proposal here is because we want to allow analytic elements in <rt>. This may be a matterfor further discussion. For the dierence, see, for example, the transcription for gure 2:
Example 10. “真⾯⽬(ま/じ/め)”.
<p rend="inline"><ruby><rb><anchor xml:id="ma"/>真<anchor xml:id="ji"/>⾯<anchor xml:id="me"/>⽬</rb><rt target="#ma">ま</rt><rt target="#ji">じ</rt><rt target="#me">め</rt></ruby></p>

AUTHORSKAZUHIRO OKADA
Kazuhiro Okada, PhD, is a lecturer at Hokkai-Gakuen University, Hokkaido, Japan. Formerly, he was a speciallyappointed assistant professor at the National Institute of Japanese Literature, where he was responsible forthe development of a project for digitized Japanese historical texts.

Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference32

Rubi as a Text

SATORU NAKAMURA
Satoru Nakamura, PhD, is an assistant professor at the Historiographical Institute of the University ofTokyo. His research centers on the development and utilization of digital archives, particularly for academic
research. He played a central role in the digitization and publication of the technical documents left by Yuzuru
Hiraga, who was president of Tokyo Imperial University and a vice-admiral in the shipbuilding division of
the Imperial Japanese Navy. Nakamura is currently engaged in developing digital archives for the Universityof Tokyo Library.
KIYONORI NAGASAKI
Kiyonori Nagasaki, PhD, is a senior fellow at the International Institute for Digital Humanities in Tokyo.
His main research interest is in the development of a digital environment for Buddhist studies. He is also
investigating the signicance of digital methodology in the humanities in Japan. Recent publications include“Contexts of Digital Humanities in Japan,” in Digital Humanities and Scholarly Research Trends in the Asia-Pacic(2019, 71–90); and Migrating Cultural Materials to the Digital Environment (in Japanese), Jusonbo, 2019.

Journal of the Text Encoding Initiative, Issue 14, 14/02/2023
Selected Papers from the 2019 TEI Conference33