This article explains how I am preparing Ralf's German dictionary 0.1.9.7. At moment, I am focusing on the creation of new <phoneme> elements:
1. Add the following rule to improve-german.xsl:
<xsl:when test="ends-with(lower-case(../grapheme), 'ier') and
ends-with(., 'iːʀ') and
not(ends-with(../grapheme, 'eier'))"><xsl:value-of select="replace($sierra, 'iːʀ', 'iːɐ̯')"/></xsl:when>
2. Add this rule:
<xsl:when test="ends-with(../grapheme, 'gen') and
not(ends-with(../grapheme, 'ngen'))"><xsl:value-of select="replace($sierra, 'gən', 'gŋ̩')"/></xsl:when>
3. Invoke the following instruction via Ubuntu terminal because I want to test whether improve-german.xsl produces the desired results:
ubuntu@ubuntu-desktop:~$ saxonb-xslt -ext:on -s:'/home/ubuntu/Documents/201006/german-0.1.9.5/german-0.1.9.6.xml' -xsl:'/home/ubuntu/Documents/201005/german-0.1.9.4/improve-german.xsl' -o:'/home/ubuntu/Documents/201006/german-0.1.9.5/german-0.1.9.7.xml'
4. Add the following rule:
<xsl:when test="contains(../grapheme, 'gens') and
not(ends-with(../grapheme, 'ngens'))"><xsl:value-of select="replace($sierra, 'gəns', 'gŋ̩s')"/></xsl:when>
What does this rule create? Here is an example:
Source dictionary:
<lexeme role="Substantiv">
<grapheme>Volkswagens</grapheme>
<phoneme>fɔlksvagəns</phoneme>
</lexeme>
Object dictionary:
<lexeme role="Substantiv">
<grapheme>Volkswagens</grapheme>
<phoneme>fɔlksvagəns</phoneme>
<phoneme>fɔlksvagŋ̩s</phoneme>
</lexeme>
You can see that I am using XSLT to produce additional <phoneme> elements.
5. Add this rule:
<xsl:when test="ends-with(../grapheme, 'bens')"><xsl:value-of select="replace($sierra, 'bəns', 'bm̩s')"/></xsl:when>
Example: Source dictionary:
<lexeme role="Substantiv">
<grapheme>Schneetreibens</grapheme>
<phoneme>ʃneːtʀaɪ̯bəns</phoneme>
</lexeme>
Object dictionary:
<lexeme role="Substantiv">
<grapheme>Schneetreibens</grapheme>
<phoneme>ʃneːtʀaɪ̯bəns</phoneme>
<phoneme>ʃneːtʀaɪ̯bm̩s</phoneme>
</lexeme>
6. Add the following rule:
<xsl:when test="ends-with(../grapheme, 'ben')"><xsl:value-of select="replace($sierra, 'bən', 'bm̩')"/></xsl:when>
Example from the source dictionary:
<lexeme role="Verb">
<grapheme>ausgeben</grapheme>
<phoneme>ʔaʊ̯sgeːbən</phoneme>
</lexeme>
Target dictionary:
<lexeme role="Verb">
<grapheme>ausgeben</grapheme>
<phoneme>ʔaʊ̯sgeːbən</phoneme>
<phoneme>ʔaʊ̯sgeːbm̩</phoneme>
</lexeme>
With this rule, I added about 1400 <phoneme> elements. It would be too much work to do this manually. Thanks to saxonb-xslt I can work efficiently and precisely.
7. If you have suggestions for improvements of Ralf's German dictionary, please tell me. At the moment, the dictionary contains 384067 <lexeme> elements. I don’t want to add more words to the dictionary at the moment. I want to improve the phoneme quality. And there are a lot of <grapheme> elements that have more than one possible pronunciation. This is my current focus to add a <phoneme> element where it seems to be appropriate. If you are missing something, please tell me.
(more…)