More Carrier
Posted by mholmes on 31 Jan 2011 in Activity log
This is the latest sequencing file, for the record:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl"
xmlns:mdh="http://www.mholmes.com/namespaces/xslt"
exclude-result-prefixes="xs xd"
version="2.0">
<xd:doc scope="stylesheet">
<xd:desc>
<xd:p><xd:b>Created on:</xd:b> Jan 28, 2011</xd:p>
<xd:p><xd:b>Author:</xd:b> mholmes</xd:p>
<xd:p></xd:p>
</xd:desc>
</xd:doc>
<xsl:function name="mdh:tweak" as="xs:string">
<xsl:param name="inString" as="xs:string"/>
<xsl:variable name="output" select="$inString"/>
<xsl:choose>
<xsl:when test="string-length($inString) gt 0">
<!-- Replace all accented vowels with their unaccented equivalents. -->
<xsl:variable name="accentsGone" select="translate(normalize-space(lower-case($inString)), 'áéíóú', 'aeiou')"/>
<!-- Get rid of all combining underscores (u+0331 and u+0332).-->
<xsl:variable name="underscoresGone" select="replace($accentsGone, '̱|̲', '')"/>
<!-- Now before we remove the apostrophes, we need to replace some pairs of letters that need to sort as if they were one.
We can use a character following z to replace a character that needs to sort after all the rest. For example:
kh needs to sort after ka, kb, kc, kz, so we can replace kh with k{
So we do:
g becomes {
h becomes }
l becomes ~
o becomes ¥
s becomes ¦
w becomes §
z becomes ©
We also want to preserve the initial apostrophe, because that leads to sorting words to the beginning
of the list; but we want to remove other apostrophes, because they're not used in sorting. So we replace
the initial one with !.
-->
<xsl:variable name="gReplaced" select="replace($underscoresGone, 'ng', 'n{')"/>
<xsl:variable name="hReplaced" select="replace($gReplaced, '(c|g|k|l|s|w)h', '$1}')"/>
<xsl:variable name="lReplaced" select="replace($hReplaced, '(d|t)l', '$1~')"/>
<xsl:variable name="oReplaced" select="replace($lReplaced, 'oo', 'o¥')"/>
<xsl:variable name="sReplaced" select="replace($oReplaced, 'ts', 't¦')"/>
<xsl:variable name="wReplaced" select="replace($sReplaced, '(g|k)w', '$1§')"/>
<xsl:variable name="zReplaced" select="replace($wReplaced, 'dz', 'd©')"/>
<xsl:variable name="firstAposReplaced" select="replace($zReplaced, '^''', '!')"/>
<xsl:variable name="aposGone" select="replace($firstAposReplaced, '''', '')"/>
<xsl:value-of select="$aposGone"/>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="noTerm">__NO DAKELH TERM IN THIS ENTRY.</xsl:variable>
<xsl:value-of select="$noTerm"/>
</xsl:otherwise>
</xsl:choose>
</xsl:function>
<xsl:template match="/">
<words>
<xsl:for-each select="//entry">
<xsl:sort select="mdh:tweak(dakTerm)"/>
<xsl:variable name="term" select="dakTerm"/>
<orig><xsl:value-of select="normalize-space($term)"/></orig><xformed><xsl:value-of select="normalize-space(mdh:tweak($term))"/></xformed><xsl:text>
</xsl:text>
</xsl:for-each>
<xsl:for-each select="//entry">
<xsl:sort select="mdh:tweak(dakTerm)"/>
<xsl:variable name="term" select="dakTerm"/>
<xsl:value-of select="normalize-space($term)"/><xsl:text>
</xsl:text>
</xsl:for-each>
</words>
</xsl:template>
</xsl:stylesheet>
I've also been examining the data in more detail, and these are some conclusions and issues. Sample entry:
[-----------------------------------------------------------------]
ID: 1724
Dakelh term: núlgaih
English translation 1: he is running
English translation 2: he is riding
English translation 3: she is running around (improper)
Part of speech: verb
Verb root: -lgaih
Scientific name:
Data source:
Description: 50 Events-activities
Syllables: núl•gaih
Possessed form:
Dakelh sentence 1: Deneyaz núlgaih whe nadílduẕ.
English sentence 1: While running the boy fell down.
Dakelh sentence 2: Huye nulgaih-i be 'oh nulgaih.
English sentence 2: He is riding the bicycle.
Dakelh sentence 3: Ts'ekeyaz n'aho nech'a núlgaih.
English sentence 3: The girl is running around ignoring us
(our advice).
[-----------------------------------------------------------------]
I've put these fields into order based on what makes sense to me, and I just wanted to confirm these conclusions:
- Dakelh term is the headword.
- English translations 1, 2, 3, and 4 (where they exist) are alternative translations of the headword.
- English sentences 1, 2, 3 and 4 (where they exist) are translations of the corresponding Dakelh sentences.
If I'm correct in these assumptions, then there are some definite inconsistencies:
- Some entries have English sentences but no corresponding Dakelh sentence, or data in the wrong places. For instance, "lilet" (ID 1201) has an English Sentence 1 of "Ts'oodunne lilet hutnai te buba yínzóo." (wrong language), and the corresponding Dakelh Sentence 1 is empty. lhai (ID 1243) has Carrier in the English Sentence 1 field ("T'álh-i lhai 'onk'ét"), and then "He bought many groceries", which looks like a translation of a sentence rather than a term, in the English Translation 2 field.
- Some entries seem to be damaged. For instance, #620 has the Dakelh term "Bill", which is surely wrong, and other fields seem to contain the wrong data.
However, I think the majority of entries are intact and correct.