[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Speechsc] Semantic Scripts - Arrays



In "Speech Processing for IP Networks" there is a reference to how
arrays of values are to be handled.

The gist of it is: 

"It is possible for the rule variable of the root rule to be of type
Array (e.g. x[0], x[1], etc) or indeed
for one of its properties to be of type Array."

I cannot see a concrete example in the specification of how this
information is supposed to be communicated from the server to the
client.

The MRCP 2 server reports this...
<stock confidence="0.687036">
   BHP
   RIO
</stock>

As you can see, there is notional identification of the two items I
spoke by way of a CR/LF.

The MRCP 2 client reports receiving this:

<stock confidence="0.687036">
   BHP
   RIO
</stock>


On the document server, this is getting passed back to me as stock:
"BRI"

Further reading of the logs on the MRCP client (produced using)

<log>The type of stock is <value
expr="typeof(Buy$.interpretation.stock)"/></log>
<log>The value of stock is <value
expr="Buy$.interpretation.stock"/></log>

reveals:

The type of stock is string
The value of stock is BRI

I would have expected that the type of stock to be array. (containing
BHP and RIO)


My problem is (from a user perspective) who do I complain to to seek a
resolution to the problem?

Can the specification clarify this matter please (or maybe I have just
missed this bit).

Here is the (edited and relevant bits of the) grammar used to generate
this:

<rule id="generic"> Buy <tag>out._service = "StockBuy"; out.stock=new
Array(); var index=0;</tag>
                            <item repeat="0-2">
                                <ruleref uri="#company"/>
                                <tag>out.stock[index++] =
""+rules.company;</tag>
                            </item>
                        </rule>
                        <rule id="company">
                            <item>
                                <one-of>
 
<item>BHP<tag>out="BHP";</tag></item>
                                    <item>Rio tinto
<tag>out="RIO";</tag></item>
                                </one-of>
                            </item>
                        </rule>

It is a bit hacked because in the process I have tried numerious ways to
realise a working array.


Kind Regards,
Arthur Vernon - Lead Software Architect, IST Networks

AUSTRALIA
(m) +61 411 336 176
(w) +61 (8) 6380 2058
Unit 5B, 1 Station St, Subiaco WA 6008