epub-translator 0.1.5__py3-none-any.whl → 0.1.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. epub_translator/__init__.py +1 -2
  2. epub_translator/data/translate.jinja +3 -0
  3. epub_translator/epub/__init__.py +1 -1
  4. epub_translator/llm/context.py +10 -1
  5. epub_translator/llm/core.py +30 -3
  6. epub_translator/segment/__init__.py +1 -0
  7. epub_translator/segment/inline_segment.py +11 -1
  8. epub_translator/segment/text_segment.py +5 -10
  9. epub_translator/segment/utils.py +0 -16
  10. epub_translator/translation/__init__.py +2 -0
  11. epub_translator/{epub_transcode.py → translation/epub_transcode.py} +2 -2
  12. epub_translator/{punctuation.py → translation/punctuation.py} +1 -1
  13. epub_translator/{translator.py → translation/translator.py} +8 -6
  14. epub_translator/{xml_interrupter.py → translation/xml_interrupter.py} +52 -28
  15. epub_translator/xml/__init__.py +1 -1
  16. epub_translator/xml/inline.py +48 -2
  17. epub_translator/xml_translator/concurrency.py +52 -0
  18. epub_translator/xml_translator/score.py +164 -0
  19. epub_translator/xml_translator/stream_mapper.py +145 -114
  20. epub_translator/xml_translator/submitter.py +5 -5
  21. epub_translator/xml_translator/translator.py +12 -18
  22. {epub_translator-0.1.5.dist-info → epub_translator-0.1.7.dist-info}/METADATA +37 -9
  23. epub_translator-0.1.7.dist-info/RECORD +63 -0
  24. epub_translator/data/mmltex/README.md +0 -67
  25. epub_translator/data/mmltex/cmarkup.xsl +0 -1106
  26. epub_translator/data/mmltex/entities.xsl +0 -459
  27. epub_translator/data/mmltex/glayout.xsl +0 -222
  28. epub_translator/data/mmltex/mmltex.xsl +0 -36
  29. epub_translator/data/mmltex/scripts.xsl +0 -375
  30. epub_translator/data/mmltex/tables.xsl +0 -130
  31. epub_translator/data/mmltex/tokens.xsl +0 -328
  32. epub_translator-0.1.5.dist-info/RECORD +0 -68
  33. /epub_translator/{language.py → translation/language.py} +0 -0
  34. /epub_translator/xml/{firendly → friendly}/__init__.py +0 -0
  35. /epub_translator/xml/{firendly → friendly}/decoder.py +0 -0
  36. /epub_translator/xml/{firendly → friendly}/encoder.py +0 -0
  37. /epub_translator/xml/{firendly → friendly}/parser.py +0 -0
  38. /epub_translator/xml/{firendly → friendly}/tag.py +0 -0
  39. /epub_translator/xml/{firendly → friendly}/transform.py +0 -0
  40. {epub_translator-0.1.5.dist-info → epub_translator-0.1.7.dist-info}/LICENSE +0 -0
  41. {epub_translator-0.1.5.dist-info → epub_translator-0.1.7.dist-info}/WHEEL +0 -0
@@ -1,130 +0,0 @@
1
- <?xml version='1.0' encoding="UTF-8"?>
2
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3
- xmlns:m="http://www.w3.org/1998/Math/MathML"
4
- version='1.0'>
5
-
6
- <!-- ====================================================================== -->
7
- <!-- $id: tables.xsl, 2002/17/05 Exp $
8
- This file is part of the XSLT MathML Library distribution.
9
- See ./README or http://www.raleigh.ru/MathML/mmltex for
10
- copyright and other information -->
11
- <!-- ====================================================================== -->
12
-
13
- <xsl:template match="m:mtd[@columnspan]">
14
- <xsl:text>\multicolumn{</xsl:text>
15
- <xsl:value-of select="@columnspan"/>
16
- <xsl:text>}{c}{</xsl:text>
17
- <xsl:apply-templates/>
18
- <xsl:text>}</xsl:text>
19
- <xsl:if test="count(following-sibling::*)>0">
20
- <xsl:text>&amp; </xsl:text>
21
- </xsl:if>
22
- </xsl:template>
23
-
24
-
25
- <xsl:template match="m:mtd">
26
- <xsl:if test="@columnalign='right' or @columnalign='center'">
27
- <xsl:text>\hfill </xsl:text>
28
- </xsl:if>
29
- <xsl:apply-templates/>
30
- <xsl:if test="@columnalign='left' or @columnalign='center'">
31
- <xsl:text>\hfill </xsl:text>
32
- </xsl:if>
33
- <xsl:if test="count(following-sibling::*)>0">
34
- <!-- this test valid for Sablotron, another form - test="not(position()=last())".
35
- Also for m:mtd[@columnspan] and m:mtr -->
36
- <xsl:text>&amp; </xsl:text>
37
- </xsl:if>
38
- </xsl:template>
39
-
40
- <xsl:template match="m:mtr">
41
- <xsl:apply-templates/>
42
- <xsl:if test="count(following-sibling::*)>0">
43
- <xsl:text>\\ </xsl:text>
44
- </xsl:if>
45
- </xsl:template>
46
-
47
- <xsl:template match="m:mtable">
48
- <xsl:text>\begin{array}{</xsl:text>
49
- <xsl:if test="@frame='solid'">
50
- <xsl:text>|</xsl:text>
51
- </xsl:if>
52
- <xsl:variable name="numbercols" select="count(./m:mtr[1]/m:mtd[not(@columnspan)])+sum(./m:mtr[1]/m:mtd/@columnspan)"/>
53
- <xsl:choose>
54
- <xsl:when test="@columnalign">
55
- <xsl:variable name="colalign">
56
- <xsl:call-template name="colalign">
57
- <xsl:with-param name="colalign" select="@columnalign"/>
58
- </xsl:call-template>
59
- </xsl:variable>
60
- <xsl:choose>
61
- <xsl:when test="string-length($colalign) > $numbercols">
62
- <xsl:value-of select="substring($colalign,1,$numbercols)"/>
63
- </xsl:when>
64
- <xsl:when test="string-length($colalign) &lt; $numbercols">
65
- <xsl:value-of select="$colalign"/>
66
- <xsl:call-template name="generate-string">
67
- <xsl:with-param name="text" select="substring($colalign,string-length($colalign))"/>
68
- <xsl:with-param name="count" select="$numbercols - string-length($colalign)"/>
69
- </xsl:call-template>
70
- </xsl:when>
71
- <xsl:otherwise>
72
- <xsl:value-of select="$colalign"/>
73
- </xsl:otherwise>
74
- </xsl:choose>
75
- </xsl:when>
76
- <xsl:otherwise>
77
- <xsl:call-template name="generate-string">
78
- <xsl:with-param name="text" select="'c'"/>
79
- <xsl:with-param name="count" select="$numbercols"/>
80
- </xsl:call-template>
81
- </xsl:otherwise>
82
- </xsl:choose>
83
- <xsl:if test="@frame='solid'">
84
- <xsl:text>|</xsl:text>
85
- </xsl:if>
86
- <xsl:text>}</xsl:text>
87
- <xsl:if test="@frame='solid'">
88
- <xsl:text>\hline </xsl:text>
89
- </xsl:if>
90
- <xsl:apply-templates/>
91
- <xsl:if test="@frame='solid'">
92
- <xsl:text>\\ \hline</xsl:text>
93
- </xsl:if>
94
- <xsl:text>\end{array}</xsl:text>
95
- </xsl:template>
96
-
97
- <xsl:template name="colalign">
98
- <xsl:param name="colalign"/>
99
- <xsl:choose>
100
- <xsl:when test="contains($colalign,' ')">
101
- <xsl:value-of select="substring($colalign,1,1)"/>
102
- <xsl:call-template name="colalign">
103
- <xsl:with-param name="colalign" select="substring-after($colalign,' ')"/>
104
- </xsl:call-template>
105
- </xsl:when>
106
- <xsl:otherwise>
107
- <xsl:value-of select="substring($colalign,1,1)"/>
108
- </xsl:otherwise>
109
- </xsl:choose>
110
- </xsl:template>
111
-
112
- <xsl:template name="generate-string">
113
- <!-- template from XSLT Standard Library v1.1 -->
114
- <xsl:param name="text"/>
115
- <xsl:param name="count"/>
116
-
117
- <xsl:choose>
118
- <xsl:when test="string-length($text) = 0 or $count &lt;= 0"/>
119
-
120
- <xsl:otherwise>
121
- <xsl:value-of select="$text"/>
122
- <xsl:call-template name="generate-string">
123
- <xsl:with-param name="text" select="$text"/>
124
- <xsl:with-param name="count" select="$count - 1"/>
125
- </xsl:call-template>
126
- </xsl:otherwise>
127
- </xsl:choose>
128
- </xsl:template>
129
-
130
- </xsl:stylesheet>
@@ -1,328 +0,0 @@
1
- <?xml version='1.0' encoding="UTF-8"?>
2
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3
- xmlns:m="http://www.w3.org/1998/Math/MathML"
4
- version='1.0'>
5
-
6
- <!-- ====================================================================== -->
7
- <!-- $Id: tokens.xsl,v 1.7 2003/06/10 12:24:05 shade33 Exp $
8
- This file is part of the XSLT MathML Library distribution.
9
- See ./README or http://www.raleigh.ru/MathML/mmltex for
10
- copyright and other information -->
11
- <!-- ====================================================================== -->
12
-
13
- <xsl:template match="m:mi|m:mn|m:mo|m:mtext|m:ms">
14
- <xsl:call-template name="CommonTokenAtr"/>
15
- </xsl:template>
16
-
17
- <!-- 3.2.9 mglyph -->
18
- <xsl:template match="m:mglyph">
19
- <xsl:text>\textcolor{red}{</xsl:text>
20
- <xsl:value-of select="@alt"/>
21
- <xsl:text>}</xsl:text>
22
- </xsl:template>
23
-
24
- <xsl:template name="mi">
25
- <xsl:choose>
26
- <xsl:when test="string-length(normalize-space(.))>1 and not(@mathvariant)">
27
- <xsl:text>\mathrm{</xsl:text>
28
- <xsl:apply-templates/>
29
- <xsl:text>}</xsl:text>
30
- </xsl:when>
31
- <xsl:otherwise>
32
- <xsl:apply-templates/>
33
- </xsl:otherwise>
34
- </xsl:choose>
35
- </xsl:template>
36
-
37
- <xsl:template name="mn">
38
- <xsl:choose>
39
- <xsl:when test="string(number(.))='NaN' and not(@mathvariant)">
40
- <xsl:text>\mathrm{</xsl:text>
41
- <xsl:apply-templates/>
42
- <xsl:text>}</xsl:text>
43
- </xsl:when>
44
- <xsl:otherwise>
45
- <xsl:apply-templates/>
46
- </xsl:otherwise>
47
- </xsl:choose>
48
- </xsl:template>
49
-
50
- <!-- 3.2.5 Math Operator -->
51
- <xsl:template name="mo">
52
- <xsl:if test="translate(normalize-space(.),'()[]}|','{{{{{{')='{'">
53
- <xsl:choose>
54
- <xsl:when test="not(@stretchy='false') and count(preceding-sibling::m:mo[translate(normalize-space(.),'()[]}|','{{{{{{')='{'])mod 2=0 and following-sibling::m:mo[1][not(@stretchy='false')][translate(normalize-space(.),'()[]}|','{{{{{{')='{']">
55
- <xsl:text>\left</xsl:text>
56
- </xsl:when>
57
- <xsl:when test="not(@stretchy='false') and count(preceding-sibling::m:mo[translate(normalize-space(.),'()[]}|','{{{{{{')='{'])mod 2=1 and preceding-sibling::m:mo[1][not(@stretchy='false')][translate(normalize-space(.),'()[]}|','{{{{{{')='{']">
58
- <xsl:text>\right</xsl:text>
59
- </xsl:when>
60
- </xsl:choose>
61
- </xsl:if>
62
- <xsl:apply-templates/>
63
- </xsl:template>
64
-
65
- <xsl:template name="mtext">
66
- <xsl:variable name="content">
67
- <xsl:call-template name="replaceMtextEntities">
68
- <xsl:with-param name="content" select="normalize-space(.)"/>
69
- </xsl:call-template>
70
- </xsl:variable>
71
- <xsl:text>\text{</xsl:text>
72
- <xsl:value-of select="$content"/>
73
- <xsl:text>}</xsl:text>
74
- </xsl:template>
75
-
76
- <xsl:template match="m:mspace">
77
- <xsl:text>\phantom{\rule</xsl:text>
78
- <xsl:if test="@depth">
79
- <xsl:text>[-</xsl:text>
80
- <xsl:value-of select="@depth"/>
81
- <xsl:text>]</xsl:text>
82
- </xsl:if>
83
- <xsl:text>{</xsl:text>
84
- <xsl:if test="not(@width)">
85
- <xsl:text>0ex</xsl:text>
86
- </xsl:if>
87
- <xsl:value-of select="@width"/>
88
- <xsl:text>}{</xsl:text>
89
- <xsl:if test="not(@height)">
90
- <xsl:text>0ex</xsl:text>
91
- </xsl:if>
92
- <xsl:value-of select="@height"/>
93
- <xsl:text>}}</xsl:text>
94
- </xsl:template>
95
-
96
- <xsl:template name="ms">
97
- <xsl:choose>
98
- <xsl:when test="@lquote"><xsl:value-of select="@lquote"/></xsl:when>
99
- <xsl:otherwise><xsl:text>''</xsl:text></xsl:otherwise>
100
- </xsl:choose><xsl:apply-templates/><xsl:choose>
101
- <xsl:when test="@rquote"><xsl:value-of select="@rquote"/></xsl:when>
102
- <xsl:otherwise><xsl:text>''</xsl:text></xsl:otherwise>
103
- </xsl:choose>
104
- </xsl:template>
105
-
106
- <xsl:template name="CommonTokenAtr">
107
- <xsl:if test="@mathbackground">
108
- <xsl:text>\colorbox[rgb]{</xsl:text>
109
- <xsl:call-template name="color">
110
- <xsl:with-param name="color" select="@mathbackground"/>
111
- </xsl:call-template>
112
- <xsl:text>}{$</xsl:text>
113
- </xsl:if>
114
- <xsl:if test="@color[not(@mathcolor)] or @mathcolor"> <!-- Note: @color is deprecated in MathML 2.0 -->
115
- <xsl:text>\textcolor[rgb]{</xsl:text>
116
- <xsl:call-template name="color">
117
- <xsl:with-param name="color" select="@color|@mathcolor"/>
118
- </xsl:call-template>
119
- <xsl:text>}{</xsl:text>
120
- </xsl:if>
121
- <xsl:if test="@mathvariant">
122
- <xsl:choose>
123
- <xsl:when test="@mathvariant='normal'">
124
- <xsl:text>\mathrm{</xsl:text>
125
- </xsl:when>
126
- <xsl:when test="@mathvariant='bold'">
127
- <xsl:text>\mathbf{</xsl:text>
128
- </xsl:when>
129
- <xsl:when test="@mathvariant='italic'">
130
- <xsl:text>\mathit{</xsl:text>
131
- </xsl:when>
132
- <xsl:when test="@mathvariant='bold-italic'"> <!-- not supported -->
133
- <xsl:text>\mathit{</xsl:text>
134
- <xsl:message>The value bold-italic for mathvariant is not supported</xsl:message>
135
- </xsl:when>
136
- <xsl:when test="@mathvariant='double-struck'"> <!-- Required amsfonts -->
137
- <xsl:text>\mathbb{</xsl:text>
138
- </xsl:when>
139
- <xsl:when test="@mathvariant='bold-fraktur'"> <!-- not supported -->
140
- <xsl:text>\mathfrak{</xsl:text>
141
- <xsl:message>The value bold-fraktur for mathvariant is not supported</xsl:message>
142
- </xsl:when>
143
- <xsl:when test="@mathvariant='script'">
144
- <xsl:text>\mathcal{</xsl:text>
145
- </xsl:when>
146
- <xsl:when test="@mathvariant='bold-script'"> <!-- not supported -->
147
- <xsl:text>\mathcal{</xsl:text>
148
- <xsl:message>The value bold-script for mathvariant is not supported</xsl:message>
149
- </xsl:when>
150
- <xsl:when test="@mathvariant='fraktur'"> <!-- Required amsfonts -->
151
- <xsl:text>\mathfrak{</xsl:text>
152
- </xsl:when>
153
- <xsl:when test="@mathvariant='sans-serif'">
154
- <xsl:text>\mathsf{</xsl:text>
155
- </xsl:when>
156
- <xsl:when test="@mathvariant='bold-sans-serif'"> <!-- not supported -->
157
- <xsl:text>\mathsf{</xsl:text>
158
- <xsl:message>The value bold-sans-serif for mathvariant is not supported</xsl:message>
159
- </xsl:when>
160
- <xsl:when test="@mathvariant='sans-serif-italic'"> <!-- not supported -->
161
- <xsl:text>\mathsf{</xsl:text>
162
- <xsl:message>The value sans-serif-italic for mathvariant is not supported</xsl:message>
163
- </xsl:when>
164
- <xsl:when test="@mathvariant='sans-serif-bold-italic'"> <!-- not supported -->
165
- <xsl:text>\mathsf{</xsl:text>
166
- <xsl:message>The value sans-serif-bold-italic for mathvariant is not supported</xsl:message>
167
- </xsl:when>
168
- <xsl:when test="@mathvariant='monospace'">
169
- <xsl:text>\mathtt{</xsl:text>
170
- </xsl:when>
171
- <xsl:otherwise>
172
- <xsl:text>{</xsl:text>
173
- <xsl:message>Error at mathvariant attribute</xsl:message>
174
- </xsl:otherwise>
175
- </xsl:choose>
176
- </xsl:if>
177
- <xsl:call-template name="selectTemplate"/>
178
- <xsl:if test="@mathvariant">
179
- <xsl:text>}</xsl:text>
180
- </xsl:if>
181
- <xsl:if test="@color or @mathcolor">
182
- <xsl:text>}</xsl:text>
183
- </xsl:if>
184
- <xsl:if test="@mathbackground">
185
- <xsl:text>$}</xsl:text>
186
- </xsl:if>
187
- </xsl:template>
188
-
189
- <xsl:template name="selectTemplate">
190
- <xsl:choose>
191
- <xsl:when test="local-name(.)='mi'">
192
- <xsl:call-template name="mi"/>
193
- </xsl:when>
194
- <xsl:when test="local-name(.)='mn'">
195
- <xsl:call-template name="mn"/>
196
- </xsl:when>
197
- <xsl:when test="local-name(.)='mo'">
198
- <xsl:call-template name="mo"/>
199
- </xsl:when>
200
- <xsl:when test="local-name(.)='mtext'">
201
- <xsl:call-template name="mtext"/>
202
- </xsl:when>
203
- <xsl:when test="local-name(.)='ms'">
204
- <xsl:call-template name="ms"/>
205
- </xsl:when>
206
- </xsl:choose>
207
- </xsl:template>
208
-
209
- <xsl:template name="color">
210
- <!-- NB: Variables colora and valueColor{n} only for Sablotron -->
211
- <xsl:param name="color"/>
212
- <xsl:variable name="colora" select="translate($color,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/>
213
- <xsl:choose>
214
- <xsl:when test="starts-with($colora,'#') and string-length($colora)=4">
215
- <xsl:variable name="valueColor">
216
- <xsl:call-template name="Hex2Decimal">
217
- <xsl:with-param name="arg" select="substring($colora,2,1)"/>
218
- </xsl:call-template>
219
- </xsl:variable>
220
- <xsl:value-of select="$valueColor div 15"/><xsl:text>,</xsl:text>
221
- <xsl:variable name="valueColor1">
222
- <xsl:call-template name="Hex2Decimal">
223
- <xsl:with-param name="arg" select="substring($colora,3,1)"/>
224
- </xsl:call-template>
225
- </xsl:variable>
226
- <xsl:value-of select="$valueColor1 div 15"/><xsl:text>,</xsl:text>
227
- <xsl:variable name="valueColor2">
228
- <xsl:call-template name="Hex2Decimal">
229
- <xsl:with-param name="arg" select="substring($colora,4,1)"/>
230
- </xsl:call-template>
231
- </xsl:variable>
232
- <xsl:value-of select="$valueColor2 div 15"/>
233
- </xsl:when>
234
- <xsl:when test="starts-with($colora,'#') and string-length($colora)=7">
235
- <xsl:variable name="valueColor1">
236
- <xsl:call-template name="Hex2Decimal">
237
- <xsl:with-param name="arg" select="substring($colora,2,1)"/>
238
- </xsl:call-template>
239
- </xsl:variable>
240
- <xsl:variable name="valueColor2">
241
- <xsl:call-template name="Hex2Decimal">
242
- <xsl:with-param name="arg" select="substring($colora,3,1)"/>
243
- </xsl:call-template>
244
- </xsl:variable>
245
- <xsl:value-of select="($valueColor1*16 + $valueColor2) div 255"/><xsl:text>,</xsl:text>
246
- <xsl:variable name="valueColor1a">
247
- <xsl:call-template name="Hex2Decimal">
248
- <xsl:with-param name="arg" select="substring($colora,4,1)"/>
249
- </xsl:call-template>
250
- </xsl:variable>
251
- <xsl:variable name="valueColor2a">
252
- <xsl:call-template name="Hex2Decimal">
253
- <xsl:with-param name="arg" select="substring($colora,5,1)"/>
254
- </xsl:call-template>
255
- </xsl:variable>
256
- <xsl:value-of select="($valueColor1a*16 + $valueColor2a) div 255"/><xsl:text>,</xsl:text>
257
- <xsl:variable name="valueColor1b">
258
- <xsl:call-template name="Hex2Decimal">
259
- <xsl:with-param name="arg" select="substring($colora,6,1)"/>
260
- </xsl:call-template>
261
- </xsl:variable>
262
- <xsl:variable name="valueColor2b">
263
- <xsl:call-template name="Hex2Decimal">
264
- <xsl:with-param name="arg" select="substring($colora,7,1)"/>
265
- </xsl:call-template>
266
- </xsl:variable>
267
- <xsl:value-of select="($valueColor1b*16 + $valueColor2b) div 255"/>
268
- </xsl:when>
269
- <!-- ======================= if color specifed as an html-color-name ========================================== -->
270
- <xsl:when test="$colora='aqua'"><xsl:text>0,1,1</xsl:text></xsl:when>
271
- <xsl:when test="$colora='black'"><xsl:text>0,0,0</xsl:text></xsl:when>
272
- <xsl:when test="$colora='blue'"><xsl:text>0,0,1</xsl:text></xsl:when>
273
- <xsl:when test="$colora='fuchsia'"><xsl:text>1,0,1</xsl:text></xsl:when>
274
- <xsl:when test="$colora='gray'"><xsl:text>.5,.5,.5</xsl:text></xsl:when>
275
- <xsl:when test="$colora='green'"><xsl:text>0,.5,0</xsl:text></xsl:when>
276
- <xsl:when test="$colora='lime'"><xsl:text>0,1,0</xsl:text></xsl:when>
277
- <xsl:when test="$colora='maroon'"><xsl:text>.5,0,0</xsl:text></xsl:when>
278
- <xsl:when test="$colora='navy'"><xsl:text>0,0,.5</xsl:text></xsl:when>
279
- <xsl:when test="$colora='olive'"><xsl:text>.5,.5,0</xsl:text></xsl:when>
280
- <xsl:when test="$colora='purple'"><xsl:text>.5,0,.5</xsl:text></xsl:when>
281
- <xsl:when test="$colora='red'"><xsl:text>1,0,0</xsl:text></xsl:when>
282
- <xsl:when test="$colora='silver'"><xsl:text>.75,.75,.75</xsl:text></xsl:when>
283
- <xsl:when test="$colora='teal'"><xsl:text>0,.5,.5</xsl:text></xsl:when>
284
- <xsl:when test="$colora='white'"><xsl:text>1,1,1</xsl:text></xsl:when>
285
- <xsl:when test="$colora='yellow'"><xsl:text>1,1,0</xsl:text></xsl:when>
286
- <xsl:otherwise>
287
- <xsl:message>Exception at color template</xsl:message>
288
- </xsl:otherwise>
289
- </xsl:choose>
290
- </xsl:template>
291
-
292
- <xsl:template name="Hex2Decimal">
293
- <xsl:param name="arg"/>
294
- <xsl:choose>
295
- <xsl:when test="$arg='f'">
296
- <xsl:value-of select="15"/>
297
- </xsl:when>
298
- <xsl:when test="$arg='e'">
299
- <xsl:value-of select="14"/>
300
- </xsl:when>
301
- <xsl:when test="$arg='d'">
302
- <xsl:value-of select="13"/>
303
- </xsl:when>
304
- <xsl:when test="$arg='c'">
305
- <xsl:value-of select="12"/>
306
- </xsl:when>
307
- <xsl:when test="$arg='b'">
308
- <xsl:value-of select="11"/>
309
- </xsl:when>
310
- <xsl:when test="$arg='a'">
311
- <xsl:value-of select="10"/>
312
- </xsl:when>
313
- <xsl:when test="translate($arg, '0123456789', '9999999999')='9'"> <!-- if $arg is number -->
314
- <xsl:value-of select="$arg"/>
315
- </xsl:when>
316
- <xsl:otherwise>
317
- <xsl:message>Exception at Hex2Decimal template</xsl:message>
318
- </xsl:otherwise>
319
- </xsl:choose>
320
- </xsl:template>
321
-
322
- <xsl:template match="m:*/text()">
323
- <xsl:call-template name="replaceEntities">
324
- <xsl:with-param name="content" select="normalize-space()"/>
325
- </xsl:call-template>
326
- </xsl:template>
327
-
328
- </xsl:stylesheet>
@@ -1,68 +0,0 @@
1
- epub_translator/__init__.py,sha256=m2uTGNmBmZhRWQjjYQ1TVrjOuFXJhzQnuuTOq5-t29U,234
2
- epub_translator/data/fill.jinja,sha256=zSytA8Vhp2i6YBZ09F1z9iPJq1-jUaiphoXqTNZwnvo,6964
3
- epub_translator/data/mmltex/README.md,sha256=wwhe5yW1U_7_YZIFKnQVnCOmUl7Mu3gsr3lNnDSJ5Qs,2953
4
- epub_translator/data/mmltex/cmarkup.xsl,sha256=DkhimAATM0XSCfVOfY41-qTPoddqzOHjZ00Pynr4zQE,37707
5
- epub_translator/data/mmltex/entities.xsl,sha256=TYZ5iGg0u9XlDDBBGuZiHL7MsxKc-3OsTIBAVM1GDek,107742
6
- epub_translator/data/mmltex/glayout.xsl,sha256=Ztc7N1wiHaYZlo9u9iuROrIl3uIIIoo1VFIuojXq7TM,6879
7
- epub_translator/data/mmltex/mmltex.xsl,sha256=BVXFbApz-9W2qRKKtBTxptK5vxG2bfB8tv9W1MP5iBI,1384
8
- epub_translator/data/mmltex/scripts.xsl,sha256=f4ei0cDCW3cV-Ra7rC3kC5tRcKdjJxbSpCeQLoohtgo,13697
9
- epub_translator/data/mmltex/tables.xsl,sha256=RxtNo8qDtVAg8_6BuYsafraB_0z7YDAB9D__fT9gmWs,4327
10
- epub_translator/data/mmltex/tokens.xsl,sha256=j3JZRcBhAiiY8o5K3640phfLwxO8JVspCFlSttwBzJk,12373
11
- epub_translator/data/translate.jinja,sha256=93d8kschm5HV-EfXd1kFSIVMObDqTMdoUrwDfce2bhU,820
12
- epub_translator/epub/__init__.py,sha256=ZddRHrLNVzgaSVrYflGnrq8tffmlKPhBbz9ok7sp8PY,149
13
- epub_translator/epub/common.py,sha256=4-SpTe8iot9hMfyXILmlUFvYVNYqPAHL5hn1fr2wgis,1180
14
- epub_translator/epub/math.py,sha256=-Q2LJQxxjgQZQUe_WlJA9tjzLqgqtw2ZmbGbHsPRp2U,5422
15
- epub_translator/epub/metadata.py,sha256=DXSimY2iZNBA2juIaKtB-4CHHSYJiDK7PPhfenV4dto,3511
16
- epub_translator/epub/spines.py,sha256=bP2IsobZm7zs4z10iXGc9SmgAFSIq9pJc8HE-V0aW9Y,1331
17
- epub_translator/epub/toc.py,sha256=TKJfyDT4svFkXd6JCNZk2ZEYc9q-5DXnV3zY2UKo8nE,14891
18
- epub_translator/epub/zip.py,sha256=-3LI8f-ksgU8xCy28NjBOKyQPE8PhPEUPqIKZE1p8dw,2364
19
- epub_translator/epub_transcode.py,sha256=NzuvXXEZfAhIoMOSrgQRF0DPtaSpz4OY-NMSdC0Y2RM,2749
20
- epub_translator/language.py,sha256=88osG0JNYxOkxBjg5Pm-P0Mhiyxf6GqdxoPW12HW0PE,493
21
- epub_translator/llm/__init__.py,sha256=YcFYYnXmXyX0RUyC-PDbj5k7Woygp_XOpTI3vDiNSPM,75
22
- epub_translator/llm/context.py,sha256=73paN3V66LQ6muKUSMCKEHEmMYBylK-dXOF8LmaQo5M,3885
23
- epub_translator/llm/core.py,sha256=AorV4ss4Hr-IbAk8FmGhV2hgI2tKxQmW2Vz2WwUd0Ms,5110
24
- epub_translator/llm/error.py,sha256=4efAIQL14DFSvAnSTUfgdAbZRqaWBqOfUGsSfvxa5zM,1503
25
- epub_translator/llm/executor.py,sha256=A0IjQ-s9wBJuhAZAAydneb9zBXWnu2J9inR2Q8F-GDE,5533
26
- epub_translator/llm/increasable.py,sha256=8XkKeI1hiHlpMHj8dQ4fW0BkViSx4hH8QfbQsy-5SDw,1297
27
- epub_translator/llm/types.py,sha256=c-dMAIvlG4R3la3mUTWEw5xei-sIYKmQeBja7mirxcI,219
28
- epub_translator/punctuation.py,sha256=Yrf3b_Pl36FPBaK96LR-EBjnztlcZZTWLSNaYoWIUSc,812
29
- epub_translator/segment/__init__.py,sha256=UYTv_IKQbEB0DzhFeiuqCvjoJLvB-7XRwlaFS90KmIw,573
30
- epub_translator/segment/block_segment.py,sha256=psNKA_HMIcwZtoug8AtnAcV9_mQ2WXLnXqFsekHzt2g,4570
31
- epub_translator/segment/common.py,sha256=gGWYQaJ0tGnWCuF1me9TOo-Q_DrZVakCu2patyFIOs0,714
32
- epub_translator/segment/inline_segment.py,sha256=_ZgSlZmGxzIvaPs01hreoUfnaXz8Yq7naksT34dGfds,14221
33
- epub_translator/segment/text_segment.py,sha256=Fos3tTuTcpnm-NmqPftzqov1_Rwr57PBv8AIgjKNYcg,6389
34
- epub_translator/segment/utils.py,sha256=qMqUt33pDRN5Tnuydkodzu2gaQrwTzAnQmXpDuHen1o,1036
35
- epub_translator/serial/__init__.py,sha256=b3IMVmWcUwEqHKcGmey88b057pyz5ct946CaUZi4LB4,67
36
- epub_translator/serial/chunk.py,sha256=FrTaHikVOd6bLYumnEriTaAQ_DIDLjHm16gh-wBVR9k,1495
37
- epub_translator/serial/segment.py,sha256=uEz-ke1KcYrON-68FaUEzMG2CzHlMjvbC11F3ZT4yH0,446
38
- epub_translator/serial/splitter.py,sha256=Nq0sxPXos8ez7QBG01sOKjnYKbeBWUBHflZGtqenVm8,1726
39
- epub_translator/template.py,sha256=0CqRmj3nTtPshw0NmTr2ECqelops2MMyX94fMrE-HKs,1587
40
- epub_translator/translator.py,sha256=SL0Qh49QaZD3bKKkf5xM0hF2MkPqzxKO8uyo8rn9wTQ,6421
41
- epub_translator/utils.py,sha256=BfZWrYjzDNQ4cFrgvRNzd4i1CKLtPxS8Z4LBHhqEV78,914
42
- epub_translator/xml/__init__.py,sha256=1sBLICHtNNw0UNMOXCZzrZ7uGfOwnPf_m4MmmMNzakY,160
43
- epub_translator/xml/const.py,sha256=Re2TYmpwG7-jVVgSq3R_K-uYhvAYzcXcRmLFkwCPD9Y,19
44
- epub_translator/xml/deduplication.py,sha256=TaMbzeA70VvUQV0X1wcQFVbuMEPJUtj9Hq6iWlUmtAQ,1152
45
- epub_translator/xml/firendly/__init__.py,sha256=I5jhnhFWoHvojLsYXH4jfR4Gi8lKFZ3yQ56ze5hEe1M,74
46
- epub_translator/xml/firendly/decoder.py,sha256=xRQ5LnSunmYbba_0oT39oUr86-sLYAHYMUGmlseIu2U,2467
47
- epub_translator/xml/firendly/encoder.py,sha256=evjvw6oE-oCud44IsJ-YZVHn6dtUzjNYX25ljaZP6vY,2417
48
- epub_translator/xml/firendly/parser.py,sha256=QlMHA0nfPJbNyx6IwRFrYVw7okuvzDB42NXCauIFV-o,6560
49
- epub_translator/xml/firendly/tag.py,sha256=ahaGoYttuAlnFxLFFgTV51KUZSpUiHho-COZX14nxN8,3308
50
- epub_translator/xml/firendly/transform.py,sha256=5tG1MJmzrXIR_Z5gmRxwcoKvXBzJBVH0ELeaRsG-8w0,1201
51
- epub_translator/xml/inline.py,sha256=mwFho6wq2gYWmWcg5Cw6OQeteV-a-i6X9OE63fzblpE,1274
52
- epub_translator/xml/self_closing.py,sha256=41ofGUdss9yU51IVwI4It6hKfzh8YcxIR_j-ohD19LE,5240
53
- epub_translator/xml/utils.py,sha256=7tQ6L5P0_JXhxONeG64hEeeL5mKjA6NKS1H1Q9B1Cac,1062
54
- epub_translator/xml/xml.py,sha256=qQ5Wk1-KVVHE4TX25zGOR7fINsGkXnoq-qyKKNl5no4,1675
55
- epub_translator/xml/xml_like.py,sha256=jBK4UUgXXWRYnfYlCH1MUAjGHWBQAbUj8HsYqvTTWvA,8890
56
- epub_translator/xml_interrupter.py,sha256=IGLATr7zTIdhE54Gnroab4Xu_vLJ7kzPiQgk7WMXKTc,7403
57
- epub_translator/xml_translator/__init__.py,sha256=lqts1mJL_WfojDnMAQ5OM7TbT6u9X3H-X4C_avHzvXM,128
58
- epub_translator/xml_translator/callbacks.py,sha256=IoZrsaivd2W76cHFupwv6auVxgEWHcBN2MHQJYcWoJ8,1324
59
- epub_translator/xml_translator/common.py,sha256=hSPptgPp7j6dm47imELB5DgmEbzTEyJD6WEeELOOc50,38
60
- epub_translator/xml_translator/hill_climbing.py,sha256=1jvilOkTLzwljJA4Nrel8yU2XGvOXpueUJTK7RAp-XY,4272
61
- epub_translator/xml_translator/stream_mapper.py,sha256=tbMc2vyPUn9zEkJZ7-OVYuKaYyn2pPPwjcAdQ8HLzNs,10179
62
- epub_translator/xml_translator/submitter.py,sha256=6PGQTnEcOgL3zseDpSzDmU5d9Eg3eO5OfPIGmQp2DVY,14155
63
- epub_translator/xml_translator/translator.py,sha256=eIvniqKtNoqFFvfvxK4oA-W02y5ZTpmPQ8wFAJlvOUU,9752
64
- epub_translator/xml_translator/validation.py,sha256=-OKlSZuD__sjAiEpGAO93YQme4ZDSPmoPjRsAMOCEjc,16668
65
- epub_translator-0.1.5.dist-info/LICENSE,sha256=5RF32sL3LtMOJIErdDKp1ZEYPGXS8WPpsiSz_jMBnGI,1066
66
- epub_translator-0.1.5.dist-info/METADATA,sha256=IT5MBdl68pICDYmk5tn3CwvdnZ5QxlVoaSzw-VhKf3c,14603
67
- epub_translator-0.1.5.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
68
- epub_translator-0.1.5.dist-info/RECORD,,
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes