-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathruby.xml
135 lines (128 loc) · 5.37 KB
/
ruby.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="ruby.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="ruby.isosch" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:r="http://www.tei-c.org/ns/proposal/ruby">
<teiHeader>
<fileDesc>
<titleStmt>
<title/>
</titleStmt>
<publicationStmt>
<p>Free to anyone for any purpose.</p>
</publicationStmt>
<sourceDesc>
<p>Invented based on examples in prior work on this ticket.</p>
</sourceDesc>
</fileDesc>
</teiHeader>
<text>
<body>
<div>
<p>All of these examples are based on a single very useful image of a real
text which appears in the Ruby proposal.</p>
<div>
<head>Simple example</head>
<p>Simple example taken from proposal document: billiard hall, with dual pronunciations
<q>biriādo</q> and <q>dakyūba</q>. I've added the <q>ba</q> to the end of the right-side
ruby text for simplicity, and used a supplied element to indicate that it's added.</p>
<p>First, the simplest possible setup: the entire word is glossed in one:</p>
<p style="writing-mode: vertical-rl">
<r:ruby>
<r:rb>打球場</r:rb>
<r:rt place="left">ビリヤード</r:rt>
<r:rt place="right">ダキウ<supplied>バ</supplied></r:rt>
</r:ruby>
</p>
</div>
<div>
<head>Character by character</head>
<p>Next, we divide the characters with explicit ruby elements. This seems awkward; another approach
would be to use pure contiguity to signal that every rt element applies to its preceding
rb element, but contiguity has drawbacks too.</p>
<p style="writing-mode: vertical-rl">
<r:ruby>
<r:rb>打</r:rb>
<r:rt place="left">ビリ</r:rt>
<r:rt place="right">ダ</r:rt>
</r:ruby>
<r:ruby>
<r:rb>球</r:rb>
<r:rt place="left">ヤー</r:rt>
<r:rt place="right">キウ</r:rt>
</r:ruby>
<r:ruby>
<r:rb>場</r:rb>
<r:rt place="left">ド</r:rt>
</r:ruby>
</p>
</div>
<div>
<head>Alternative segmentation</head>
<p>The actual example is intriguing in that the right-side ruby
glosses apply to the first and second characters respectively, but
the left-side gloss applies to the whole word as a unit. We can
capture this using nested ruby elements.
</p>
<p style="writing-mode: vertical-rl">
<r:ruby>
<r:rb>
<r:ruby>
<r:rb>打</r:rb>
<r:rt place="right">ダ</r:rt>
</r:ruby>
<r:ruby>
<r:rb>球</r:rb>
<r:rt place="right">キウ</r:rt>
</r:ruby>
場
</r:rb>
<r:rt place="left">ビリヤード</r:rt>
</r:ruby>
</p>
</div>
<div>
<head>Standoff ruby</head>
<p>Next, we use anchors and pointers to map the relationships. This is effective, but it
generates a lot of anchor elements.</p>
<p style="writing-mode: vertical-rl">
<r:ruby>
<r:rb><anchor xml:id="da"/>打<anchor xml:id="kyuu"/>球<anchor xml:id="ba"/>場<anchor
xml:id="owari"/></r:rb>
<r:rt place="left" from="#da" to="#owari">ビリヤード</r:rt>
<r:rt place="right" from="#da" to="#kyuu">ダ</r:rt>
<r:rt place="right" from="#kyuu" to="#ba">キウ</r:rt>
</r:ruby>
</p>
</div>
<div>
<head>Another standoff approach using regular elements</head>
<p>In place of anchors, we can use wrapping elements. This was not proposed by
the group, but @sydb and @martindholmes think it's a good approach:</p>
<p style="writing-mode: vertical-rl">
<r:ruby>
<r:rb xml:id="dakyuuba"><c xml:id="c1">打</c><c xml:id="c2">球</c>場</r:rb>
<r:rt place="left" target="#dakyuuba">ビリヤード</r:rt>
<r:rt place="right" target="#c1">ダ</r:rt>
<r:rt place="right" target="#c2">キウ</r:rt>
</r:ruby>
</p>
</div>
<div>
<head>Spans via anchors</head>
<p>Another approach is to use anchors with no @xml:id to make parallel structures from which
the relationships can be inferred. This will work as long as there is only one ruby text sequence, or
where there are two or more, there are no internal differences in segmentation between them.
The second rt element simply ignores the final character.
</p>
<p style="writing-mode: vertical-rl">
<r:ruby>
<r:rb>打<anchor/>球<anchor/>場</r:rb>
<r:rt place="left">ビリ<anchor/>ヤー<anchor/>ド</r:rt>
<r:rt place="right">ダ<anchor/>キウ<anchor/></r:rt>
</r:ruby>
</p>
</div>
</div>
</body>
</text>
</TEI>