As I told earlier, I want to give information about PLS dictionary development. At the moment, Ralf’s German dictionary 0.1.7 is available. Here is how I want to modify the dictionary:
I take a closer look at the XSLT style-sheet espeak2perfectipa.xsl. I didn’t improve this style-sheet during the last 4 months.
A few minutes ago, I made a slight modification to espeak2perfectipa.xsl (= XSLT style-sheet). These are the lines that modify the phonemes for Depot:
<xsl:when test="starts-with(grapheme, 'Depot')">
<xsl:for-each select="phoneme"><xsl:text>
</xsl:text><phoneme>
<xsl:variable name="sierra"><xsl:value-of select="."/></xsl:variable>
<xsl:variable name="sierra" select="replace($sierra, 'deːpɔt', 'deːpoː')"/>
<xsl:sequence select="$sierra"/></phoneme>
</xsl:for-each>
</xsl:when>
These are some lines from Ralf’s German dictionary 0.1.7 (= source XML document):
<lexeme role="Substantiv">
<grapheme>Depotbank</grapheme>
<phoneme>deːpɔtbaŋk</phoneme>
</lexeme>
<lexeme role="Substantiv">
<grapheme>Depotfett</grapheme>
<phoneme>deːpɔtfɛt</phoneme>
</lexeme>
<lexeme role="Substantiv">
<grapheme>Depotgebühr</grapheme>
<phoneme>deːpɔtgeːbyːʀ</phoneme>
</lexeme>
<lexeme role="Substantiv">
<grapheme>Depotgesetz</grapheme>
<phoneme>deːpɔtgeːzɛts</phoneme>
</lexeme>
These are the corresponding lines of the future version of the dictionary (= result XML document):
<lexeme role="Substantiv">
<grapheme>Depotbank</grapheme>
<phoneme>deːpoːbaŋk</phoneme>
</lexeme>
<lexeme role="Substantiv">
<grapheme>Depotfett</grapheme>
<phoneme>deːpoːfɛt</phoneme>
</lexeme>
<lexeme role="Substantiv">
<grapheme>Depotgebühr</grapheme>
<phoneme>deːpoːgeːbyːʀ</phoneme>
</lexeme>
<lexeme role="Substantiv">
<grapheme>Depotgesetz</grapheme>
<phoneme>deːpoːgeːzɛts</phoneme>
</lexeme>
You can see the concept: The XSLT style-sheet defines which modifications the result PLS dictionary should contain.
The whole process is invoked via the Ubuntu terminal:
am3msi@am3msi-desktop:~/Documents/201001/0.1.8$ saxonb-xslt -ext:on -s:german-dictionary-0.1.7.xml -xsl:espeak2perfectipa.xsl -o:prepare-0.1.8.xml
Let me explain:
- saxonb-xslt is the XSLT processor;
- german-dictionary-0.1.7.xml (= Ralf’s German dictionary 0.1.7) is the XML source document;
- espeak2perfectipa.xsl is the XSLT style-sheet;
- prepare-0.1.8.xml is the XML result document. It should become Ralf’s German dictionary 0.1.8 which I will release as soon as I have made substiantial progress.
I will document further steps of dictionary development here in this blog. I hope that I can convince some people out there to apply this concept to other PLS dictionaries. So my goal is to educate people in PLS dictionary development.