Skip to content

Commit ce0fc36

Browse files
committed
Fetch additional data from the dictionary
1 parent f58d4b8 commit ce0fc36

File tree

79 files changed

+60309
-60278
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+60309
-60278
lines changed

082_scripts_xsl/mananot-to-vert.xsl

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
2+
xmlns:xs="http://www.w3.org/2001/XMLSchema"
3+
xmlns:map="http://www.w3.org/2005/xpath-functions/map"
24
xmlns:t="http://www.tei-c.org/ns/1.0"
35
version="3.0">
46

57
<xsl:output encoding="UTF-8" method="text" indent="no"/>
68
<xsl:strip-space elements="*"/>
79

10+
<xsl:variable name="dict" select="doc('../vicav_dicts/dc_shawi_eng.xml')"/>
11+
<xsl:variable name="dictById" select="map:merge($dict//t:entry!map {data(./@xml:id): .})"/>
12+
813
<xsl:template match="t:TEI">
914
<xsl:text>&lt;doc id="</xsl:text>
1015
<xsl:value-of select="t:teiHeader//t:idno[ends-with(@type, 'CorpusID')]"/>
@@ -18,15 +23,22 @@
1823
<xsl:value-of select="string-join(t:teiHeader//t:textClass//t:catRef/@target, ' ')"/>
1924
<xsl:text>" status="</xsl:text>
2025
<xsl:value-of select="t:teiHeader//t:revisionDesc/@status"/>
21-
<xsl:text xml:space="preserve">" attrs="word wid decomp dict=lemmaRef pos=msd trans=n">
26+
<xsl:text xml:space="preserve">" attrs="word wid decomp dict=lemmaRef msd trans=n pos root subc diaroot">
2227
</xsl:text>
2328
<xsl:apply-templates select="t:text/t:body"/>
2429
<xsl:text xml:space="preserve">
2530
&lt;/doc>
2631
</xsl:text>
2732
</xsl:template>
2833

29-
<xsl:template match="t:w|t:pc" xml:space="preserve"><xsl:if test=". = (',', '.', '!', '?', '[', '(')">&lt;g/>&#xa;</xsl:if><xsl:value-of select="normalize-unicode(text(), 'NFKC')"/>&#9;<xsl:value-of select="@xml:id"/>&#9;<xsl:value-of select="normalize-unicode(text(), 'NFKD')"/>&#9;<xsl:value-of select="@lemmaRef"/>&#9;<xsl:value-of select="@msd"/>&#9;<xsl:value-of select="@n"/><xsl:apply-templates select="@* except (@xml:id,@n,@lemmaRef,@msd,@join,@rend,@xml:lang)" mode="tsv"/><xsl:if test="@rend='withDash'">&#xa;&lt;g/>&#xa;-&#xa;&lt;g/></xsl:if>&#xa;</xsl:template>
34+
<xsl:template match="t:w|t:pc">
35+
<xsl:variable name="dictId" select="replace(@lemmaRef, 'dict:', '')" as="xs:string"/>
36+
<xsl:variable name="dictEntry" select="$dictById($dictId)" as="element(t:entry)?"/>
37+
<xsl:if test=". = (',', '.', '!', '?', '[', '(')" xml:space="preserve">&lt;g/>&#xa;</xsl:if>
38+
<xsl:if test="true()" xml:space="preserve"><xsl:value-of select="normalize-unicode(text(), 'NFKC')"/>&#9;<xsl:value-of select="@xml:id"/>&#9;<xsl:value-of select="normalize-unicode(text(), 'NFKD')"/>&#9;<xsl:value-of select="@lemmaRef"/>&#9;<xsl:value-of select="@msd"/>&#9;<xsl:value-of select="@n"/>&#9;<xsl:value-of select="$dictEntry//t:gram[@type='pos']"/>&#9;<xsl:value-of select="$dictEntry//t:gram[@type='synRoot']"/>&#9;<xsl:value-of select="$dictEntry//t:gram[@type='subc']"/>&#9;<xsl:value-of select="$dictEntry//t:gram[@type='diaRoot']"/><xsl:apply-templates select="@* except (@xml:id,@n,@lemmaRef,@msd,@join,@rend,@xml:lang)" mode="tsv"/></xsl:if>
39+
<xsl:if test="@rend='withDash'" xml:space="preserve">&#xa;&lt;g/>&#xa;-&#xa;&lt;g/></xsl:if>
40+
<xsl:if test="true()" xml:space="preserve">&#xa;</xsl:if>
41+
</xsl:template>
3042

3143
<xsl:template match="@*" mode="tsv">
3244
<xsl:text>&#9;</xsl:text><xsl:value-of select="local-name()"/>=<xsl:value-of select="."/>

130_vert_plain/Urfa-011_Cemetry-Harran-2010.txt

+1,162-1,162
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)