Jump to content

Pronunciation Lexicon Specification: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Usage: <p>...</p> is correct syntax. See <http://www.w3.org/TR/speech-synthesis/#edef_paragraph>
 
(19 intermediate revisions by 16 users not shown)
Line 1: Line 1:
{{Short description|World Wide Web Consortium recommendation}}
{{Use American English|date = January 2019}}

The '''Pronunciation Lexicon Specification''' (PLS) is a [[W3C]] Recommendation, which is designed to enable interoperable specification of pronunciation information for both [[speech recognition]] and [[speech synthesis]] engines within voice browsing applications. The language is intended to be easy to use by developers while supporting the accurate specification of pronunciation information for international use.
The '''Pronunciation Lexicon Specification''' (PLS) is a [[W3C]] Recommendation, which is designed to enable interoperable specification of pronunciation information for both [[speech recognition]] and [[speech synthesis]] engines within voice browsing applications. The language is intended to be easy to use by developers while supporting the accurate specification of pronunciation information for international use.


The language allows one or more pronunciations for a word or phrase to be specified using a standard pronunciation alphabet or if necessary using vendor specific alphabets. Pronunciations are grouped together into a PLS document which may be referenced from other markup languages, such as the Speech Recognition Grammar Specification [[SRGS]] and the Speech Synthesis Markup Language [[SSML]].
The language allows one or more pronunciations for a word or phrase to be specified using a standard pronunciation alphabet or if necessary using vendor specific alphabets. Pronunciations are grouped together into a PLS document which may be referenced from other markup languages, such as the Speech Recognition Grammar Specification [[SRGS]] and the Speech Synthesis Markup Language [[Speech Synthesis Markup Language|SSML]].


==Usage==
==Usage==
Line 7: Line 10:
Here is an example PLS document:
Here is an example PLS document:


<source lang="xml">
<syntaxhighlight lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<lexicon version="1.0"
<lexicon version="1.0"
Line 18: Line 21:
<grapheme>judgment</grapheme>
<grapheme>judgment</grapheme>
<grapheme>judgement</grapheme>
<grapheme>judgement</grapheme>
<phoneme>{{IPA|ˈdʒʌdʒ.mənt}}</phoneme>
<phoneme>ˈdʒʌdʒ.mənt</phoneme>
<!-- IPA string is:
<!-- IPA string is:
"&#x02C8;d&#x0292;&#x028C;d&#x0292;&#x002E;m&#x0259;nt" -->
"ˈdʒʌdʒ.mənt" -->
</lexeme>
</lexeme>
<lexeme>
<lexeme>
<grapheme>fiancé</grapheme>
<grapheme>fiancé</grapheme>
<grapheme>fiance</grapheme>
<grapheme>fiance</grapheme>
<phoneme>{{IPA|fiˈɒns.eɪ}}</phoneme>
<phoneme>fiˈɒns.eɪ</phoneme>
<!-- IPA string is:
<!-- IPA string is:
"fi&#x02C8;&#x0252;ns&#x002E;e&#x026A;" -->
"fiˈɒns.eɪ" -->
<phoneme>{{IPA|ˌfiː.ɑːnˈseɪ}}</phoneme>
<phoneme>ˌfiː.ɑːnˈseɪ</phoneme>
<!-- IPA string is:
<!-- IPA string is:
"ˌfiː.ɑːnˈseɪ" -->
"&#x02CC;fi&#x02D0;&#x002E;&#x0251;&#x02D0;n&#x02C8;se&#x026A;" -->
</lexeme>
</lexeme>
</lexicon>
</lexicon>
</syntaxhighlight>
</source>


which could be used to improve [[speech synthesis|TTS]] as shown in the following [[SSML|SSML 1.0]] document:
which could be used to improve [[speech synthesis|TTS]] as shown in the following [[Speech Synthesis Markup Language|SSML 1.0]] document:


<source lang="xml">
<syntaxhighlight lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<speak version="1.0"
<speak version="1.0"
Line 50: Line 53:
acceptable compromise.</p>
acceptable compromise.</p>
</speak>
</speak>
</syntaxhighlight>
</source>


but also to improve [[ASR]] in the following [[SRGS|SRGS 1.0]] grammar:
but also to improve [[Speech_recognition|ASR]] in the following [[SRGS|SRGS 1.0]] grammar:


<source lang="xml">
<syntaxhighlight lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<grammar version="1.0"
<grammar version="1.0"
Line 71: Line 74:
</rule>
</rule>
</grammar>
</grammar>
</syntaxhighlight>
</source>


==Common Use Cases==
==Common use cases==
===Multiple pronunciations for the same orthography===
===Multiple pronunciations for the same orthography===


For [[ASR]] systems it is common to rely on multiple pronunciations of the same word or phrase in order to cope with variations of pronunciation within a language. In the Pronunciation Lexicon language, multiple pronunciations are represented by more than one &lt;phoneme> (or &lt;alias>) element within the same &lt;lexeme> element.
For [[Speech recognition|ASR]] systems it is common to rely on multiple pronunciations of the same word or phrase in order to cope with variations of pronunciation within a language. In the Pronunciation Lexicon language, multiple pronunciations are represented by more than one <phoneme> (or <alias>) element within the same <lexeme> element.


In the following example the word "Newton" has two possible pronunciations.
In the following example the word "Newton" has two possible pronunciations.


<source lang="xml">
<syntaxhighlight lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<lexicon version="1.0"
<lexicon version="1.0"
Line 90: Line 93:
<lexeme>
<lexeme>
<grapheme>Newton</grapheme>
<grapheme>Newton</grapheme>
<phoneme>{{IPA|ˈnjuːtən}}</phoneme>
<phoneme>ˈnjuːtən</phoneme>
<!-- IPA string is: "&#x02C8;nju&#x02D0;t&#x0259;n" -->
<!-- IPA string is: "ˈnjuːtən" -->
<phoneme>{{IPA|ˈnuːtən}}</phoneme>
<phoneme>ˈnuːtən</phoneme>
<!-- IPA string is: "&#x02C8;nu&#x02D0;t&#x0259;n" -->
<!-- IPA string is: "ˈnuːtən" -->
</lexeme>
</lexeme>
</lexicon>
</lexicon>
</syntaxhighlight>
</source>


===Multiple orthographies===
===Multiple orthographies===
Line 104: Line 107:
Here are two simple examples of multiple orthographies: alternative spelling of an English word and multiple writings of a Japanese word.
Here are two simple examples of multiple orthographies: alternative spelling of an English word and multiple writings of a Japanese word.


<source lang="xml">
<syntaxhighlight lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<lexicon version="1.0"
<lexicon version="1.0"
Line 116: Line 119:
<grapheme>colour</grapheme>
<grapheme>colour</grapheme>
<grapheme>color</grapheme>
<grapheme>color</grapheme>
<phoneme>{{IPA|ˈkʌlər}}</phoneme>
<phoneme>ˈkʌlər</phoneme>
<!-- IPA string is: "&#x02C8;k&#x028C;l&#x0259;r" -->
<!-- IPA string is: "ˈkʌlər" -->
</lexeme>
</lexeme>
</lexicon>
</lexicon>
Line 127: Line 130:
xsi:schemaLocation="http://www.w3.org/2005/01/pronunciation-lexicon
xsi:schemaLocation="http://www.w3.org/2005/01/pronunciation-lexicon
http://www.w3.org/TR/2007/CR-pronunciation-lexicon-20071212/pls.xsd"
http://www.w3.org/TR/2007/CR-pronunciation-lexicon-20071212/pls.xsd"
alphabet="ipa" xml:lang="jp">
alphabet="ipa" xml:lang="ja">
&lt;!-- Japanese entry showing how multiple writing systems are handled
<!-- Japanese entry showing how multiple writing systems are handled
romaji, kanji and hiragana orthographies -->
romaji, kanji and hiragana orthographies -->
<lexeme>
<lexeme>
Line 134: Line 137:
<grapheme>日本語</grapheme>
<grapheme>日本語</grapheme>
<grapheme>にほんご</grapheme>
<grapheme>にほんご</grapheme>
<phoneme>{{IPA|ɲihoŋo}}</phoneme>
<phoneme>ɲihoŋɡo</phoneme>
<!-- IPA string is: "&#x0272;iho&#x014B;o" -->
<!-- IPA string is: "ɲihoŋɡo" -->
</lexeme>
</lexeme>
</lexicon>
</lexicon>
</syntaxhighlight>
</source>


===Homophones===
===Homophones===
Line 144: Line 147:
Most languages have [[homophones]], words with the same pronunciation but different meanings (and possibly different spellings), for instance "seed" and "cede". It is recommended that these be represented as different lexemes.
Most languages have [[homophones]], words with the same pronunciation but different meanings (and possibly different spellings), for instance "seed" and "cede". It is recommended that these be represented as different lexemes.


<source lang="xml">
<syntaxhighlight lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<lexicon version="1.0"
<lexicon version="1.0"
Line 154: Line 157:
<lexeme>
<lexeme>
<grapheme>cede</grapheme>
<grapheme>cede</grapheme>
<phoneme>{{IPA|siːd}}</phoneme>
<phoneme>siːd</phoneme>
<!-- IPA string is: "si&#x02D0;d" -->
<!-- IPA string is: "siːd" -->
</lexeme>
</lexeme>
<lexeme>
<lexeme>
<grapheme>seed</grapheme>
<grapheme>seed</grapheme>
<phoneme>{{IPA|siːd}}</phoneme>
<phoneme>siːd</phoneme>
<!-- IPA string is: "si&#x02D0;d" -->
<!-- IPA string is: "siːd" -->
</lexeme>
</lexeme>
</lexicon>
</lexicon>
</syntaxhighlight>
</source>


===Homographs===
===Homographs===


Most languages have words with different meanings but the same spelling (and sometimes different pronunciations), called [[homographs]]. For example, in English the word bass (fish) and the word bass (in music) have identical spellings but different meanings and pronunciations. Although it is recommended that these words be represented using separate &lt;lexeme> elements that are distinguished by different values of the role attribute (see Section 4.4 of PLS 1.0), if a pronunciation lexicon author does not want to distinguish between the two words they could simply be represented as alternative pronunciations within the same <lexeme> element. In the latter case the [[speech synthesis|TTS]] processor will not be able to distinguish when to apply the first or the second transcription.
Most languages have words with different meanings but the same spelling (and sometimes different pronunciations), called [[homographs]]. For example, in English the word bass (fish) and the word bass (in music) have identical spellings but different meanings and pronunciations. Although it is recommended that these words be represented using separate <lexeme> elements that are distinguished by different values of the role attribute (see Section 4.4 of PLS 1.0), if a pronunciation lexicon author does not want to distinguish between the two words they could simply be represented as alternative pronunciations within the same <lexeme> element. In the latter case the [[speech synthesis|TTS]] processor will not be able to distinguish when to apply the first or the second transcription.


In this example the pronunciations of the homograph "bass" are shown.
In this example the pronunciations of the homograph "bass" are shown.


<source lang="xml">
<syntaxhighlight lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<lexicon version="1.0"
<lexicon version="1.0"
Line 181: Line 184:
<lexeme>
<lexeme>
<grapheme>bass</grapheme>
<grapheme>bass</grapheme>
<phoneme>{{IPA|bæs}}</phoneme>
<phoneme>bæs</phoneme>
<!-- IPA string is: b&#x00E6;s -->
<!-- IPA string is: bæs -->
<phoneme>{{IPA|beɪs}}</phoneme>
<phoneme>beɪs</phoneme>
<!-- IPA string is: be&#x026A;s -->
<!-- IPA string is: beɪs -->
</lexeme>
</lexeme>
</lexicon>
</lexicon>
</syntaxhighlight>
</source>


Note that English contains numerous examples of noun-verb pairs that can be treated either as [[homographs]] or as alternative pronunciations, depending on author preference. Two examples are the noun/verb "refuse" and the noun/verb "address".
Note that English contains numerous examples of noun-verb pairs that can be treated either as [[homographs]] or as alternative pronunciations, depending on author preference. Two examples are the noun/verb "refuse" and the noun/verb "address".


<source lang="xml">
<syntaxhighlight lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<lexicon version="1.0"
<lexicon version="1.0"
Line 202: Line 205:
<lexeme role="mypos:verb">
<lexeme role="mypos:verb">
<grapheme>refuse</grapheme>
<grapheme>refuse</grapheme>
<phoneme>{{IPA|rɪˈfjuːz}}</phoneme>
<phoneme>rɪˈfjuːz</phoneme>
<!-- IPA string is: "r&#x026A;&#x02C8;fju&#x02D0;z" -->
<!-- IPA string is: "rɪˈfjuːz" -->
</lexeme>
</lexeme>
<lexeme role="mypos:noun">
<lexeme role="mypos:noun">
<grapheme>refuse</grapheme>
<grapheme>refuse</grapheme>
<phoneme>{{IPA|ˈrefjuːs}}</phoneme>
<phoneme>ˈrɛfjuːs</phoneme>
<!-- IPA string is: "&#x02C8;refju&#x02D0;s" -->
<!-- IPA string is: "ˈrɛfjuːs" -->
</lexeme>
</lexeme>
</lexicon>
</lexicon>
</syntaxhighlight>
</source>


===Pronunciation by Orthography (Acronyms, Abbreviations, etc.)===
===Pronunciation by orthography===
For some words and phrases pronunciation can be expressed quickly and conveniently as a sequence of other [[orthographies]]. The developer is not required to have linguistic knowledge, but instead makes use of the [[pronunciations]] that are already expected to be available. To express pronunciations using other orthographies the <alias> element may be used.

For some words and phrases pronunciation can be expressed quickly and conveniently as a sequence of other [[orthographies]]. The developer is not required to have linguistic knowledge, but instead makes use of the [[pronunciations]] that are already expected to be available. To express pronunciations using other orthographies the &lt;alias> element may be used.


This feature may be very useful to deal with acronym expansion.
This feature may be very useful to deal with acronym expansion.


<source lang="xml">
<syntaxhighlight lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<lexicon version="1.0"
<lexicon version="1.0"
Line 227: Line 229:
http://www.w3.org/TR/2007/CR-pronunciation-lexicon-20071212/pls.xsd"
http://www.w3.org/TR/2007/CR-pronunciation-lexicon-20071212/pls.xsd"
alphabet="ipa" xml:lang="en-US">
alphabet="ipa" xml:lang="en-US">
&lt;!--
<!--
Acronym expansion
Acronym expansion
-->
-->
Line 234: Line 236:
<alias>World Wide Web Consortium</alias>
<alias>World Wide Web Consortium</alias>
</lexeme>
</lexeme>
&lt;!--
<!--
number representation
number representation
-->
-->
Line 241: Line 243:
<alias>one hundred and one</alias>
<alias>one hundred and one</alias>
</lexeme>
</lexeme>
&lt;!--
<!--
crude pronunciation mechanism
crude pronunciation mechanism
-->
-->
Line 248: Line 250:
<alias>tie land</alias>
<alias>tie land</alias>
</lexeme>
</lexeme>
&lt;!--
<!--
crude pronunciation mechanism and acronym expansion
crude pronunciation mechanism and acronym expansion
-->
-->
Line 256: Line 258:
</lexeme>
</lexeme>
</lexicon>
</lexicon>
</syntaxhighlight>
</source>


==Status and Future==
==Status and future==
*PLS 1.0 reached the status of W3C Recommendation on 14 October 2008.
*PLS 1.0 reached the status of W3C Recommendation on 14 October 2008.


Line 264: Line 266:
* [[VoiceXML]]
* [[VoiceXML]]
* [[SRGS]]
* [[SRGS]]
* [[SSML]]
* [[Speech Synthesis Markup Language|SSML]]
* [[SISR]]
* [[SISR]]


==References==
==References==
* [http://www.w3.org/TR/pronunciation-lexicon/ PLS Specification (W3C Working Draft)]
* [http://www.w3.org/TR/pronunciation-lexicon/ PLS Specification (W3C Recommendation)]


==External links==
==External links==
Line 276: Line 278:
* [http://www.w3.org/TR/speech-synthesis/ SSML Specification (W3C Recommendation)]
* [http://www.w3.org/TR/speech-synthesis/ SSML Specification (W3C Recommendation)]
* [http://www.voicexml.org VoiceXML Forum]
* [http://www.voicexml.org VoiceXML Forum]
* [http://www.orange.com/en_EN/innovation/patents_licensing/Software/PLS.html France Telecom Orange Labs implementation of PLS 1.0 under the Gnu General Public License version 3]
* [http://www.orange.com/en_EN/innovation/software_licensing/Software/PLS.jsp France Telecom Orange Labs implementation of PLS 1.0 under the Gnu General Public License version 3]
* [http://sourceforge.net/projects/openpls Sourgeforce project for Java-based implementation of PLS 1.0]
* [http://sourceforge.net/projects/openpls SourceForge project for Java-based implementation of PLS 1.0]


{{W3C standards}}
{{W3C standards}}
Line 283: Line 285:
[[Category:World Wide Web Consortium standards]]
[[Category:World Wide Web Consortium standards]]
[[Category:XML-based standards]]
[[Category:XML-based standards]]
[[Category:Speech synthesis software]]

[[Category:Speech recognition software]]

{{compu-lang-stub}}

[[it:Pronunciation Lexicon Specification]]

Latest revision as of 13:19, 15 December 2023

The Pronunciation Lexicon Specification (PLS) is a W3C Recommendation, which is designed to enable interoperable specification of pronunciation information for both speech recognition and speech synthesis engines within voice browsing applications. The language is intended to be easy to use by developers while supporting the accurate specification of pronunciation information for international use.

The language allows one or more pronunciations for a word or phrase to be specified using a standard pronunciation alphabet or if necessary using vendor specific alphabets. Pronunciations are grouped together into a PLS document which may be referenced from other markup languages, such as the Speech Recognition Grammar Specification SRGS and the Speech Synthesis Markup Language SSML.

Usage

[edit]

Here is an example PLS document:

 <?xml version="1.0" encoding="UTF-8"?>
 <lexicon version="1.0" 
     xmlns="http://www.w3.org/2005/01/pronunciation-lexicon"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xsi:schemaLocation="http://www.w3.org/2005/01/pronunciation-lexicon 
       http://www.w3.org/TR/2007/CR-pronunciation-lexicon-20071212/pls.xsd"
     alphabet="ipa" xml:lang="en-US">
   <lexeme>
     <grapheme>judgment</grapheme>
     <grapheme>judgement</grapheme>
     <phoneme>ˈdʒʌdʒ.mənt</phoneme>
     <!-- IPA string is:
       "ˈdʒʌdʒ.mənt" --> 
   </lexeme>
   <lexeme>
     <grapheme>fiancé</grapheme>
     <grapheme>fiance</grapheme>
     <phoneme>fiˈɒns.eɪ</phoneme>
     <!-- IPA string is:
       "fiˈɒns.eɪ" --> 
     <phoneme>ˌfiː.ɑːnˈseɪ</phoneme>
     <!-- IPA string is:
       "ˌfiː.ɑːnˈseɪ" --> 
   </lexeme>
 </lexicon>

which could be used to improve TTS as shown in the following SSML 1.0 document:

 <?xml version="1.0" encoding="UTF-8"?>
 <speak version="1.0" 
     xmlns="http://www.w3.org/2001/10/synthesis" 
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://www.w3.org/2001/10/synthesis
       http://www.w3.org/TR/speech-synthesis/synthesis.xsd"
     xml:lang="en-US">
   <lexicon uri="http://www.example.org/lexicon_defined_above.xml"/>
   <p> In the judgement of my fiancé, Las Vegas is the best place for a honeymoon.
       I replied that I preferred Venice and didn't think the Venetian casino was an
       acceptable compromise.</p>
 </speak>

but also to improve ASR in the following SRGS 1.0 grammar:

 <?xml version="1.0" encoding="UTF-8"?>
 <grammar version="1.0"
     xmlns="http://www.w3.org/2001/06/grammar"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xsi:schemaLocation="http://www.w3.org/2001/06/grammar 
       http://www.w3.org/TR/speech-grammar/grammar.xsd"
     xml:lang="en-US" root="movies" mode="voice">
   <lexicon uri="http://www.example.org/lexicon_defined_above.xml"/>
   <rule id="movies" scope="public">
     <one-of>
             <item>Terminator 2: Judgment Day</item> 
             <item>My Big Fat Obnoxious Fiance</item> 
             <item>Pluto's Judgement Day</item>
     </one-of> 
   </rule>
 </grammar>

Common use cases

[edit]

Multiple pronunciations for the same orthography

[edit]

For ASR systems it is common to rely on multiple pronunciations of the same word or phrase in order to cope with variations of pronunciation within a language. In the Pronunciation Lexicon language, multiple pronunciations are represented by more than one <phoneme> (or <alias>) element within the same <lexeme> element.

In the following example the word "Newton" has two possible pronunciations.

 <?xml version="1.0" encoding="UTF-8"?>
 <lexicon version="1.0" 
      xmlns="http://www.w3.org/2005/01/pronunciation-lexicon"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xsi:schemaLocation="http://www.w3.org/2005/01/pronunciation-lexicon 
        http://www.w3.org/TR/2007/CR-pronunciation-lexicon-20071212/pls.xsd"
      alphabet="ipa" xml:lang="en-GB">
   <lexeme>
     <grapheme>Newton</grapheme>
     <phoneme>ˈnjuːtən</phoneme>
     <!-- IPA string is: "ˈnjuːtən" -->
     <phoneme>ˈnuːtən</phoneme>
     <!-- IPA string is: "ˈnuːtən" -->
   </lexeme>
 </lexicon>

Multiple orthographies

[edit]

In some situations there are alternative textual representations for the same word or phrase. This can arise due to a number of reasons. See Section 4.5 of PLS for details. Because these are representations that have the same meaning (as opposed to homophones), it is recommended that they be represented using a single <lexeme> element that contains multiple graphemes.

Here are two simple examples of multiple orthographies: alternative spelling of an English word and multiple writings of a Japanese word.

 <?xml version="1.0" encoding="UTF-8"?>
 <lexicon version="1.0" 
      xmlns="http://www.w3.org/2005/01/pronunciation-lexicon"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xsi:schemaLocation="http://www.w3.org/2005/01/pronunciation-lexicon 
        http://www.w3.org/TR/2007/CR-pronunciation-lexicon-20071212/pls.xsd"
      alphabet="ipa" xml:lang="en-US">
   <!-- English entry showing how alternative spellings are handled -->
   <lexeme>
     <grapheme>colour</grapheme>
     <grapheme>color</grapheme>
     <phoneme>ˈkʌlər</phoneme>
     <!-- IPA string is: "ˈkʌlər" -->
   </lexeme>
 </lexicon>

 <?xml version="1.0" encoding="UTF-8"?>
 <lexicon version="1.0" 
      xmlns="http://www.w3.org/2005/01/pronunciation-lexicon"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xsi:schemaLocation="http://www.w3.org/2005/01/pronunciation-lexicon 
        http://www.w3.org/TR/2007/CR-pronunciation-lexicon-20071212/pls.xsd"
      alphabet="ipa" xml:lang="ja">
   <!-- Japanese entry showing how multiple writing systems are handled
          romaji, kanji and hiragana orthographies -->
   <lexeme>
     <grapheme>nihongo</grapheme>
     <grapheme>日本語</grapheme>
     <grapheme>にほんご</grapheme>
     <phoneme>ɲihoŋɡo</phoneme>
     <!-- IPA string is: "ɲihoŋɡo" -->
   </lexeme>
 </lexicon>

Homophones

[edit]

Most languages have homophones, words with the same pronunciation but different meanings (and possibly different spellings), for instance "seed" and "cede". It is recommended that these be represented as different lexemes.

 <?xml version="1.0" encoding="UTF-8"?>
 <lexicon version="1.0" 
      xmlns="http://www.w3.org/2005/01/pronunciation-lexicon"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xsi:schemaLocation="http://www.w3.org/2005/01/pronunciation-lexicon 
        http://www.w3.org/TR/2007/CR-pronunciation-lexicon-20071212/pls.xsd"
      alphabet="ipa" xml:lang="en-US">
   <lexeme>
     <grapheme>cede</grapheme>
     <phoneme>siːd</phoneme>
     <!-- IPA string is: "siːd" -->
   </lexeme>
   <lexeme>
     <grapheme>seed</grapheme>
     <phoneme>siːd</phoneme>
     <!-- IPA string is: "siːd" -->
   </lexeme>
 </lexicon>

Homographs

[edit]

Most languages have words with different meanings but the same spelling (and sometimes different pronunciations), called homographs. For example, in English the word bass (fish) and the word bass (in music) have identical spellings but different meanings and pronunciations. Although it is recommended that these words be represented using separate <lexeme> elements that are distinguished by different values of the role attribute (see Section 4.4 of PLS 1.0), if a pronunciation lexicon author does not want to distinguish between the two words they could simply be represented as alternative pronunciations within the same <lexeme> element. In the latter case the TTS processor will not be able to distinguish when to apply the first or the second transcription.

In this example the pronunciations of the homograph "bass" are shown.

 <?xml version="1.0" encoding="UTF-8"?>
 <lexicon version="1.0" 
      xmlns="http://www.w3.org/2005/01/pronunciation-lexicon"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xsi:schemaLocation="http://www.w3.org/2005/01/pronunciation-lexicon 
        http://www.w3.org/TR/2007/CR-pronunciation-lexicon-20071212/pls.xsd"
      alphabet="ipa" xml:lang="en-US">
   <lexeme>
     <grapheme>bass</grapheme>
     <phoneme>bæs</phoneme>
     <!-- IPA string is: bæs -->
     <phoneme>beɪs</phoneme>
     <!-- IPA string is: beɪs -->
   </lexeme>
 </lexicon>

Note that English contains numerous examples of noun-verb pairs that can be treated either as homographs or as alternative pronunciations, depending on author preference. Two examples are the noun/verb "refuse" and the noun/verb "address".

 <?xml version="1.0" encoding="UTF-8"?>
 <lexicon version="1.0" 
      xmlns="http://www.w3.org/2005/01/pronunciation-lexicon"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xsi:schemaLocation="http://www.w3.org/2005/01/pronunciation-lexicon 
        http://www.w3.org/TR/2007/CR-pronunciation-lexicon-20071212/pls.xsd"
      xmlns:mypos="http://www.example.org/my_pos_namespace"
      alphabet="ipa" xml:lang="en-US">
   <lexeme role="mypos:verb">
     <grapheme>refuse</grapheme>
     <phoneme>rɪˈfjuːz</phoneme>
     <!-- IPA string is: "rɪˈfjuːz" -->
   </lexeme>
   <lexeme role="mypos:noun">
     <grapheme>refuse</grapheme>
     <phoneme>ˈrɛfjuːs</phoneme>
     <!-- IPA string is: "ˈrɛfjuːs" -->
   </lexeme>
 </lexicon>

Pronunciation by orthography

[edit]

For some words and phrases pronunciation can be expressed quickly and conveniently as a sequence of other orthographies. The developer is not required to have linguistic knowledge, but instead makes use of the pronunciations that are already expected to be available. To express pronunciations using other orthographies the <alias> element may be used.

This feature may be very useful to deal with acronym expansion.

 <?xml version="1.0" encoding="UTF-8"?>
 <lexicon version="1.0" 
      xmlns="http://www.w3.org/2005/01/pronunciation-lexicon"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xsi:schemaLocation="http://www.w3.org/2005/01/pronunciation-lexicon 
        http://www.w3.org/TR/2007/CR-pronunciation-lexicon-20071212/pls.xsd"
      alphabet="ipa" xml:lang="en-US">
   <!-- 
     Acronym expansion
   -->
   <lexeme>
     <grapheme>W3C</grapheme>
     <alias>World Wide Web Consortium</alias>
   </lexeme>
   <!-- 
     number representation
   -->
   <lexeme>
     <grapheme>101</grapheme>
     <alias>one hundred and one</alias>
   </lexeme>
   <!-- 
     crude pronunciation mechanism
   -->
   <lexeme>
     <grapheme>Thailand</grapheme>
     <alias>tie land</alias>
   </lexeme>
   <!-- 
     crude pronunciation mechanism and acronym expansion
   -->
   <lexeme>
     <grapheme>BBC 1</grapheme>
     <alias>be be sea one</alias>
   </lexeme>
 </lexicon>

Status and future

[edit]
  • PLS 1.0 reached the status of W3C Recommendation on 14 October 2008.

See also

[edit]

References

[edit]
[edit]