RE: PLS and Part of Speech Tagging

Hi Percy,

Reading your email I suspect some misunderstanding.
I'll try to add some more information around the example.
I hope it will help you.

Paolo
======================================================================

1. Namespace usage: xmlns:mypos="http://www.example.org/my_pos_namespace"

In XML, namespaces are used to make unique identifier, especially when mixing different XML languages in the same document to avoid name clashes. See [1] and even [2] for more details.

So, if you have two XML language with the same element <p>, to avoid confusion you can declare:
xmlns="http://www.example.org/lang1"
xmlns:xyz="http://www.example.org/lang2"

So that:
<p> will be the element <p> of lang1
<xyz:p> will be the element <p> of lang2

In this way element and attribute identifiers become unambiguous.

NOTE: It is very important that the URI used in xmlns will be stable.
This is why all the W3C languages have Namespaces on stable URI and other languages have different mechanism to register the namespaces.

2. What "http://www.example.org/my_pos_namespace" should contain?

The URI used for namespace declaration is not meant to contain particular information. You can verify it by opening in the browser the namespace URI of PLS 1.0 [3], or SSML 1.0 or 1.1 [4].
If you open them, you will see a page with a brief description and pointers to the specification. Also because the specification will describe which is the DTD or the XML Schema that defines the elements and attributes of the language.

But nothing prevents you to insert in that URI something more, for instance the identifiers important for your language. For instance, to put the list of the legal POS values (i.e. CLAWS tagset 7), so that this link becomes more informative.
In future when a new version of POS tag is defined a new URI can contain the new definition. Etc.

NOTE: The PLS 1.0 was asking to external organization to do that. Or, as I wrote in a previous email, also W3C Voice Browser or other group might do that or push for the creation of a registry. It will take time to start and realize that.

3. How to specify the "role" attribute in PLS 1.0?

The description and an example is in Section 4.4 [5].

<?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:claws="http://www.example.com/claws7tags" alphabet="ipa"
      xml:lang="en">
  <lexeme role="claws:VVI claws:VV0 claws:NN1">
    <!-- verb infinitive, verb present tense, singular noun -->
    <grapheme>read</grapheme>
    <phoneme>ri&#x02D0;d<!-- same as ri?d --></phoneme>
  </lexeme>
  <lexeme role="claws:VVN claws:VVD">
    <!-- verb past participle, verb past tense -->
    <grapheme>read</grapheme>
    <phoneme>red</phoneme>
  </lexeme>
</lexicon>

where:
- xmlns:claws="http://www.example.com/claws7tags"
  declares "http://www.example.com/claws7tags" to be the namespace for tagset7 of CLAWS
- lexeme elements can contain role attribute with values like:
  role="claws:VVI claws:VV0 claws:NN1"
  where 'claws' prefix makes the values to be of tagset7 CLAWS, so: VVI (infinitive), VV0 (base form of lexical verb), NN1 (singular common noun), etc..

At this point the lexemnes in the lexicon are annotated with the tagset of CLAWS.
The lexicon is now ready to be used.

4. How to use PLS 1.0 with "role" attributes in TTS?

The PLS 1.0 is a resource of pronunciations to be complement TTS [6] or ASR [7].

For TTS, you need another language like SSML 1.1 [8] to give the text to be spoken and you can activate a PLS lexicon in it.

<?xml version="1.0"?>
<speak version="1.1" 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-synthesis11/synthesis.xsd"
       xml:lang="en-GB">

    <s>Percy is a great guy.</s>
                <s>All women love Percy Henry.</s>
</speak>

The above is an SSML 1.1 document to speak your example sentence *without lexicon*.

To add the lexicon, you have do declare it, like in:

<?xml version="1.0"?>
<speak version="1.1" 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-synthesis11/synthesis.xsd"
       xml:lang="en-GB">

  <lexicon uri="http://www.example.com/lexicon.pls" xml:id="pls"/>

  <lookup ref="pls">
    <s>Percy is a great guy.</s>
                <s>All women love Percy Henry.</s>
  </lookup>
</speak>

In this case the lexicon.pls will be used during TTS for the example sentence, but as you see there isn't reference to the POS classification. Now, I add it:

<?xml version="1.0"?>
<speak version="1.1" 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-synthesis11/synthesis.xsd"
                   xmlns:claws="http://www.example.com/claws7tags"
       xml:lang="en-GB">

  <lexicon uri="http://www.example.com/lexicon.pls" xml:id="pls"/>

  <lookup ref="pls">
    <s>
      <token role="claws:NP1">Percy</token>
      <token role="claws:VBZ">is</token>
      <token role="claws:AT1">a</token>
      <token role="claws:JJ">great</token>
      <token role="claws:NN1">guy</token>
                </s>
                <s>
      <token role="claws:DB">All</token>
      <token role="claws:NN2">women</token>
      <token role="claws:VV0">love</token>
      <token role="claws:NP1">Percy</token>
      <token role="claws:NP1">Henry</token>
                </s>
  </lookup>
</speak>

In this case the TTS will use lexicon.pls and each word will declare its own POS.

This is your example represented thorough the current specifications.

5. References

[1] http://www.w3.org/TR/xml-names11
[2] http://en.wikipedia.org/wiki/XML_Namespace#Namespace_names
[3] http://www.w3.org/2005/01/pronunciation-lexicon
[4] http://www.w3.org/2001/10/synthesis
[5] http://www.w3.org/TR/pronunciation-lexicon/#S4.4
[6] http://www.w3.org/TR/pronunciation-lexicon/#S1.1
[7] http://www.w3.org/TR/pronunciation-lexicon/#S1.2
[8] http://www.w3.org/TR/speech-synthesis11/

From: Percy Henry [mailto:phenry1026@hotmail.com]
Sent: martedì 6 agosto 2013 9.21
To: Baggia, Paolo
Cc: www-voice@w3.org
Subject: RE: PLS and Part of Speech Tagging

Greetings Paolo,

Can you let me know what should be contained in the namespace for the dummy line


xmlns:mypos="http://www.example.org/my_pos_namespace"

For example if the TTS being read consist entirely of the following two sentences:

Percy is a great guy.  All women love Percy Henry.

Should  http://www.example.org/my_pos_namespace contain the following:

Percy_NP1 is_VBZ a_AT1 great_JJ guy_NN1 ._.

All_DB women_NN2 love_VV0 Percy_NP1 Henry_NP1 ._.
The tagged output is from the CLAWS POS tagger.

Best Regards
Percy Henry
________________________________
From: phenry1026@hotmail.com<mailto:phenry1026@hotmail.com>
To: paolo.baggia@nuance.com<mailto:paolo.baggia@nuance.com>
CC: www-voice@w3.org<mailto:www-voice@w3.org>
Date: Mon, 8 Jul 2013 19:11:18 -0400
Subject: RE: PLS and Part of Speech Tagging
Greetings Paolo,

Thanks for your quick reply.  Any of the options you sketched sounds like an excellent long-term solution.

Regards,

Percy
________________________________
From: Paolo.Baggia@nuance.com<mailto:Paolo.Baggia@nuance.com>
To: phenry1026@hotmail.com<mailto:phenry1026@hotmail.com>
CC: www-voice@w3.org<mailto:www-voice@w3.org>; Paolo.Baggia@nuance.com<mailto:Paolo.Baggia@nuance.com>
Date: Mon, 8 Jul 2013 14:56:42 +0000
Subject: RE: PLS and Part of Speech Tagging
Hi Percy Henry,

It's interesting to read that in your opinion the "role attribute" is the most important concept and feature in PLS 1.0, but I wasn't going to describe it as a "throw away feature". I was trying to say that it falls in an area of difficult to be specified features, like the extensible ones. I was speaking on the specification not on its relevance for the potential users..

I agree that the owners of the POS classifications are diverse organizations and it might be difficult to ask them additional work on not well documented procedures.

As you say, if there is an interest around "role attribute", it would be nice to channel it inside the VBWG for future work. As a rule, new standardization activity can be done, provided that some interested people will be willing to help. That might be you or anyone else interested on the same feature.

I briefly discussed your request with the W3C lead of the VBWG and here are some options on the table:

a. Namespace (or simply URI)

This is in the line of the PLS 1.0 spec. A list of POS is represented by a URI, but the organizations should define it. Perhaps a W3C Note might clarify how to do that or help other people to understand the mechanisms and provide more examples.

b. Specific W3C WG Note (see EmotionML 1.0 [1])

In that specification the existence of vocabularies is delegated to a W3C Note that will describe them. This solution allows the 'engine developers' to implement the W3C Note and to leave it open to future revisions.

c. IANA registry (see SSML 1.1 [2])

In this case, the specification defers to a IANA registry to contain the legal values for certain attributes. For instance all the language tags and subtags relies on a IANA Registry.

What I'm saying it that a stable solution to your request should follow one of the three options above, and that perhaps a little additional work might be done on top of the current specification to close the holes you are mentioning.

I hope this will help, also because I'm not currently involved in active work inside the VBWG, but I'm very happy if the specification can be used with some more clarifications.

Regards,
Paolo Baggia

[1] http://www.w3.org/TR/2013/PR-emotionml-20130416/#s2.2.1
    and also: http://www.w3.org/TR/emotion-voc/
[2] http://www.w3.org/TR/speech-synthesis11/#S3.1.10.1

From: Percy Henry [mailto:phenry1026@hotmail.com]<mailto:[mailto:phenry1026@hotmail.com]>
Sent: giovedì 4 luglio 2013 22.11
To: Baggia, Paolo
Cc: www-voice@w3.org<mailto:www-voice@w3.org>
Subject: RE: PLS and Part of Speech Tagging

Greetings Paolo,

Thanks very much for your overview of the PLS and on how W3C views the role attribute as an optional function.

As an end-user of PLS, I must say that I am happy with all aspects of your documentation except with the documentation of the "role attribute".

My first disagreement with your comments is that you seem to regard the "role attribute" as a throw away feature of PLS. This is unfortunate, because the "role attribute" is the most important concept and feature in PLS and far more effort should be made by W3C to show a completed working example of the "role attribute".

Second, with no intentions of being disrespectful, your reply was circular and essentially just summed up the documentation that is currently on your website, which you indicated was not adequate.

Third, you indicated that xmlns:mypos="http://www.example.org/my_pos_namespace<http://www.example..org/my_pos_namespace>" should be replaced with a real and stable URI (possibly an official one provided by the CLAWS people, or other organizations for different POS values)".

This is easier said that done as my following email of June 20th below indicates:

<< Start of Email >>
Greetings Dr Rayson,

As a follow-up to my earlier e-mail, can you inform me if the Free CLAWS WWW trial service URI: http://ucrel.lancs.ac..uk/claws/trial.html<http://ucrel.lancs.ac.uk/claws/trial.html> could be modified to work with a Pronunciation Lexicon Specification (PLS) file and used to replace the dummy line:


xmlns:mypos="http://www.example.org/my_pos_namespace"

If this is possible, please provide the modified URI

Thank You,
Percival A. Henry, Ph.D.

<< End of Email>

As indicated in the above email, the CLAWS part-of-speech tagger (University Centre for Computer Corpus Research on Language) now offers free part of speech tagging for up to 100,000 words at http://ucrel.lancs.ac..uk/claws/trial.html<http://ucrel.lancs.ac.uk/claws/trial.html>.

Unfortunately, I have received no reply to the request made in the email noted above because I do not believe Dr Rayson (who is an academic) has the technical know how to modify the URI to make it workable with PLS.  I do however, believe that W3C should have the technical capability to modify the free CLAWS URI to provide a workable URI for the "role attribute".

Fourth, my question about using the Stanford part of speech tagger as an alternative to the CLAWS tagger was not taken seriously.  See for example, the following post: https://mailman.stanford.edu/pipermail/java-nlp-user/2013-June/003672.html.  As the posting indicate, the academic institutions that create these part of speech taggers do not consider it their responsibility to create URIs for them.

Until you can give end users a simple workable URI to replace the dummy URI, the most important conceptual breakthrough in PLS will remain for the most part useless.

Best Regards,

Percy Henry
________________________________
From: Paolo.Baggia@nuance.com<mailto:Paolo.Baggia@nuance.com>
To: phenry1026@hotmail.com<mailto:phenry1026@hotmail.com>
CC: Paolo.Baggia@nuance.com<mailto:Paolo.Baggia@nuance.com>; www-voice@w3.org<mailto:www-voice@w3.org>
Date: Thu, 4 Jul 2013 14:23:48 +0000
Subject: PLS and Part of Speech Tagging
Hi Henry,

First of all, I have to say that I wasn't involved in further work around PLS 1.0 after it became W3C Recommendation, so I can only share my personal opinion, and try to recall some of the discussions done during that time.
* By the way if you want to share something about your interest on using PLS 1.0, I'll appreciate.

The primary goal of PLS 1.0 was to offer a standard to VBWG engines (mainly but not limited to ASR and TTS engines) for encoding lexical pronunciations. For those engines the lexicon was used to improve pronunciation of specific ASR or TTS elements.
In that scenario the 'role' attribute was seen as an optional feature of the language to be used by advanced engines.
This is the reason why there are only a few examples and it is a bit under-specified. There wasn't an attempt to standardize syntactic categories, because outside the charter of that standardization effort, but possibly to use existing ones inside PLS.

On 'role' attribute:

1. An organization or individual should declare admissible values for the role attribute. The suggested way was to declare a Namespace to be unambiguous in an XML world. For instance CLAWS should have been declared as a Namespace and registered as an URI.

2. If the above is done, a PLS document might reference the specific namespace to bind a prefix to that namespace like "claws" (see section 4.4, [1]) or "mypos", in the example section 5..5 [2]. By doing that the prefix will be bound to the namespace and it will allow an engine to check the correcteness of the values.

3. At this point some of the lexeme elements might include the role attribute in their definition and the role attribute will contain a string of whitespace separated Qnames in the form of "prefix:value", e.g. "claws:NN", or "claws:DD1", where "claws" is the prefix to connect to a specific namespace and the rest are legal values in that namespace.

4. An engine can then use the "role" attribute during the selection of a pronunciation in a specific context.

This is what I recall of the discussions done at that time and I'm sure there are details to be completed, but I hope it will help you to better understand the picture.

About your specific question:

-          xmlns:mypos="http://www.example.org/my_pos_namespace"
it should be replaced with a real and stable URI (possibly an official one provided by CLAWS people, or other organizations for different POS values)"and "mypos" is your prefix and can be changes as you like, for instance "claws"
-          role="claws:VV0" or role="claws:NN"
for a lexical entry that is a Verb and the other for the Noun

For another set of POS, like Stanford, the xmlns should contain a different prefix with a specific URI.

Regards,
Paolo Baggia

[1] http://www.w3.org/TR/pronunciation-lexicon/#S4.4
[2] http://www.w3.org/TR/pronunciation-lexicon/#S5.5

---
From: Percy Henry <phenry1026@hotmail.com<mailto:phenry1026@hotmail.com?Subject=Re%3A%20PLS%20and%20Part%20of%20Speech%20Tagging&In-Reply-To=%3CBLU168-W10031CDD34B72E4FD911AB3D2890%40phx.gbl%3E&References=%3CBLU168-W10031CDD34B72E4FD911AB3D2890%40phx.gbl%3E>>
Date: Sat, 22 Jun 2013 22:16:34 -0400
Message-ID: <BLU168-W10031CDD34B72E4FD911AB3D2890@phx.gbl<mailto:BLU168-W10031CDD34B72E4FD911AB3D2890@phx.gbl>>
To: "www-voice@w3.org<mailto:www-voice@w3.org?Subject=Re%3A%20PLS%20and%20Part%20of%20Speech%20Tagging&In-Reply-To=%3CBLU168-W10031CDD34B72E4FD911AB3D2890%40phx.gbl%3E&References=%3CBLU168-W10031CDD34B72E4FD911AB3D2890%40phx.gbl%3E>" <www-voice@w3.org<mailto:www-voice@w3.org?Subject=Re%3A%20PLS%20and%20Part%20of%20Speech%20Tagging&In-Reply-To=%3CBLU168-W10031CDD34B72E4FD911AB3D2890%40phx.gbl%3E&References=%3CBLU168-W10031CDD34B72E4FD911AB3D2890%40phx.gbl%3E>>

Greetings.



Could you inform me, how do I modify the dummy line:



xmlns:mypos="http://www.example.org/my_pos_namespace"



to use and recognize the UCREL CLAWS7 Tagset in a Pronunciation Lexicon Specification (PLS) File.







Any real world working replacement for xmlns:mypos="http://www.example.org/my_pos_namespace" would be greatly appreciated.



Also could the Stanford POS Tagger used as the tagger for Pronunciation Lexicon Specification (PLS) File.

Received on Thursday, 8 August 2013 09:43:35 UTC