0
votes

The IBM Watson Dialog API documentation on the following page refers to an entityRules node for expert dialog designers to extract the system-programmed entities but does not say anything else about the node:

http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/doc/dialog/reference_nodes.shtml#reference_entityRules

Is there more detailed documentation on how this node can be used?

1

1 Answers

0
votes

You can use entities to create your own data type. So in the doc, we see the example

<entities>
        <entity name="currency" entityExample="dollar" entityType="GENERIC">
            <value name="USD" value="USD">
                <grammar>
                    <item>dollar </item>
                    <item>buck</item>
                </grammar>
            </value>
            <value name="EUR" value="EUR">
                <grammar>
                    <item>euro</item>
                    <item>eur</item>
                    <item>european buck</item>
                </grammar>
            </value>
            <entityRules></entityRules>
        </entity>
    </entities>

This "currency" entity has a couple of value types (USD and EUR) but it could be extended to have more rows with more examples of each value. We could also add more values (say YEN, AUD etc or Japanese Yen, Australia Dollar etc).

The next thing would be to utilize the entity in a variation. So you could add a variation in an Input node, example:

I want to convert (currency) to (currency) tomorrow!

You can use any entities in a variation by simply including brackets around it. You can also assign entity info into a profile variable so you can later access it and utilize it in your Dialog logic. Example variation:

I want to convert (currency)={CURRENCY1} to (currency)={CURRENCY2} tomorrow!

In this example, CURRENCY1 and CURRENCY2 are profile variables, that at run time, contain the entity match info.

Hope this helps.