Create dialog using json file - ibm-watson

I have been working on watson dialog for few days now, and I am able to create a dialog using .xml file after following few tutorials.
<?xml version="1.0" encoding="UTF-8"?>
<dialog xsi:noNamespaceSchemaLocation="WatsonDialogDocument_1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<flow>
<folder label="Main">
<output>
<prompt selectionType="RANDOM">
<item>Hi, I'll show you the latest buzz around a topic of your choice. What topic are you interested in?</item>
</prompt>
<goto ref="getUserInput_2442994"/>
</output>
<output>
<prompt selectionType="RANDOM">
<item>Bye</item>
</prompt>
<getUserInput id="getUserInput_2442994">
<search ref="folder_2442998"/>
</getUserInput>
</output>
</folder>
<folder label="Library">
<folder label="Live Content" id="folder_2447777">
<output>
<prompt selectionType="RANDOM">
<item>Alright. Open this URL to see the tweets: http://insights-search.mybluemix.net/api/1/messages/search?q={Topic}%20AND%20posted%3A2015-07-01%20AND%20sentiment%3A{Sentiment}</item>
</prompt>
</output>
</folder>
<folder label="Live Content" id="folder_2442998">
<input>
<grammar>
<item>*</item>
</grammar>
<action varName="Topic" operator="SET_TO_USER_INPUT"/>
<output>
<prompt selectionType="SEQUENTIAL">
<item>Are you interested in positive or negative tweets?</item>
</prompt>
<getUserInput>
<input>
<grammar>
<item>positive</item>
</grammar>
<action varName="Sentiment" operator="SET_TO">positive</action>
<goto ref="folder_2447777"/>
</input>
<input>
<grammar>
<item>negative</item>
</grammar>
<action varName="Sentiment" operator="SET_TO">negative</action>
<goto ref="folder_2447777"/>
</input>
<input>
<grammar>
<item>*</item>
</grammar>
<action varName="Sentiment" operator="SET_TO">nothing</action>
<goto ref="folder_2442998"/>
</input>
</getUserInput>
</output>
</input>
</folder>
<folder label="Storage"/>
</folder>
<folder label="Global"/>
<folder label="Concepts">
<concept>
<grammar>
<item>positive</item>
<item>good</item>
</grammar>
</concept>
</folder>
</flow>
<entities>
</entities>
<constants>
</constants>
<variables>
<var_folder name="Home">
<var name="Topic" type="TEXT"/>
<var name="Sentiment" type="TEXT"/>
</var_folder>
</variables>
<settings>
</settings>
<specialSettings>
</specialSettings>
</dialog>
I am using nodeJs for my server and wish to switch to JSON instead of XML. As the API reference says,
The dialog template file. Valid extensions are .mct for encrypted
dialog files, .json, and .xml.
I dont find any JSON structure anywhere in the documentation for the dialog file.
Has anyone tried this before and succeeded in using JSON instead of XML? How?

The Dialog service only accepts XML and MCT files. I think you found an error in the documentation.
On the other hand, the service was deprecated on August 15, 2016. Existing instances of the service will continue to function until August 9, 2017. We are encouraging users to migrate to use the Conversation service.
The conversation service has a web tool that lets you create dialogs, you won't have to write XML. It also allows you to export the project as JSON.

Related

Position Outlook Add-In button on the `AppointmentOrganizerCommandSurface`

I am trying to add a button to the AppointmentOrganizerCommandSurface in Outlook just like Giphy is added in this image, but instead, my My Office Add-in is added to the menu.
I would like to add an action button with my custom icon next to the Giphy action.
I tried manipulating manifest.xml. I went through the documentation and followed the steps, but I was unable to figure out what is going on.
Here is the manifest:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" xsi:type="MailApp">
<Id>61262617-dad8-4e84-a9e4-89b1bab3e6e7</Id>
<Version>1.0.0.0</Version>
<ProviderName>Contoso</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="My Office Add-In"/>
<Description DefaultValue="A template to get started."/>
<IconUrl DefaultValue="https://localhost:3000/assets/icon-64.png"/>
<HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/icon-128.png"/>
<SupportUrl DefaultValue="https://www.contoso.com/help"/>
<AppDomains>
<AppDomain>https://www.contoso.com</AppDomain>
</AppDomains>
<Hosts>
<Host Name="Mailbox"/>
</Hosts>
<Requirements>
<Sets>
<Set Name="Mailbox" MinVersion="1.1"/>
</Sets>
</Requirements>
<FormSettings>
<Form xsi:type="ItemRead">
<DesktopSettings>
<SourceLocation DefaultValue="https://localhost:3000/taskpane.html"/>
<RequestedHeight>250</RequestedHeight>
</DesktopSettings>
</Form>
</FormSettings>
<Permissions>ReadWriteItem</Permissions>
<Rule xsi:type="RuleCollection" Mode="Or">
<Rule xsi:type="ItemIs" ItemType="Message" FormType="Read"/>
</Rule>
<DisableEntityHighlighting>false</DisableEntityHighlighting>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
<Requirements>
<bt:Sets DefaultMinVersion="1.3">
<bt:Set Name="Mailbox"/>
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<FunctionFile resid="Commands.Url"/>
<ExtensionPoint xsi:type="AppointmentOrganizerCommandSurface">
<OfficeTab id="TabDefault">
<Group id="msgReadGroup">
<Label resid="GroupLabel"/>
<Control xsi:type="Button" id="msgReadOpenPaneButton">
<Label resid="TaskpaneButton.Label"/>
<Supertip>
<Title resid="TaskpaneButton.Label"/>
<Description resid="TaskpaneButton.Tooltip"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="Taskpane.Url"/>
</Action>
</Control>
<Control xsi:type="Button" id="ActionButton">
<Label resid="ActionButton.Label"/>
<Supertip>
<Title resid="ActionButton.Label"/>
<Description resid="ActionButton.Tooltip"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>action</FunctionName>
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Icon.16x16" DefaultValue="https://localhost:3000/assets/icon-16.png"/>
<bt:Image id="Icon.32x32" DefaultValue="https://localhost:3000/assets/icon-32.png"/>
<bt:Image id="Icon.80x80" DefaultValue="https://localhost:3000/assets/icon-80.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="Commands.Url" DefaultValue="https://localhost:3000/commands.html"/>
<bt:Url id="Taskpane.Url" DefaultValue="https://localhost:3000/taskpane.html"/>
</bt:Urls>
<bt:ShortStrings>
<bt:String id="GroupLabel" DefaultValue="Contoso Add-in"/>
<bt:String id="TaskpaneButton.Label" DefaultValue="Show Taskpane"/>
<bt:String id="ActionButton.Label" DefaultValue="Perform an action"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="TaskpaneButton.Tooltip" DefaultValue="Opens a pane displaying all available properties."/>
<bt:String id="ActionButton.Tooltip" DefaultValue="Perform an action when clicked."/>
</bt:LongStrings>
</Resources>
</VersionOverrides>
</OfficeApp>
Thank you in advance.
You need to pin your add-in in the outlook to acheive the same.
You can pin an add-in so it's easily available when you're composing an email message.
Select Settings> View all Outlook settings > Mail > Customize actions.
Select the check box for the add-in that you want to see when you’re composing a message.

Using grxml instead of inline grammar in my VXML

I have written a VXML which for the most part works. I would like to use a grxml now instead of inline grammar.
I created icecream.grxml in the same exact directory AS MY vxml APP and i call it like this
<grammar src="icecream.grxml" type="application/srgs+xml"/>
for example
<form id="formIdicecream">
<grammar src="icecream.grxml" type="application/srgs+xml"/>
<field name="icecream"> <prompt> What is your favorite icecream? </prompt> </field>
<field name="confirm">
<prompt> Your favorite icecream is <value expr="icecream$.utterance"/> </prompt>
</field>
<block> <goto next="#formIddtmf"/> </block>
my icecream.grxml looks like below, when I run my code I get an error :
Grammar activation failed |MSG=error activating grammar|URI=icecream.grxml
#
<!--Header-->
<?xml version="1.0"?>
<grammar xmlns="http://www.w3.org/2001/06/grammar"
xml:lang="en-US"
root="icecream"
mode="voice">
<!--Rules-->
<rule id="icecream">
<one-of>
<item><ruleref
uri="#vanilla" /></item>
<item><ruleref
uri="#chocolate" /></item>
<item><ruleref
uri="#strawberry" /></item>
</one-of>
</rule>
<rule id="vanilla">
<one-of>
<item>vanilla</item>
<item>nilla</item>
</one-of>
</rule>
<rule id="chocolate">
<one-of>
<item>chocolate</item>
<item>colate</item>
</one-of>
</rule>
<rule id="strawberry">
<one-of>
<item>strawberry</item>
<item>straw</item>
</one-of>
</rule>
</grammar>

Code::Blocks fails to create and to find obj files. "No such file or directory"

Running Code::Blocks 17.12 on Windows 10. I used the install with minGW.
I working on an SDL2 project with C. (project as in .cbp project). I've already compiled and run the program just fine. Then I added a second source file. I included it in the first with:
#include <vec2D.c>
it couldn't find the new file, and then I added the directory of the project itself to the search directories of the compiler and the linker, which worked.
Then it couldn't find the obj files. I checked that they were there, both of them, in the appropriate directory, which they were. I noticed the error said
Development\Game\game.c -o obj\Release\game.o||No such file or directory|
||error: no input files|
and the obj folder is in the Game folder, alongside the source file. should "game.c" be there at the end? I think if it were looking in "Development\Game" and not "Development\Game\game.c" maybe it would find the obj files, but I don't know how to change that.
I also tried rebuilding the entire project from scratch in another directory to see if C::B fixed it by itself, this time it created vec2d.o and found it during compilation, but not game.o (!!!).
folder contents, C::B project
space.cbp:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="Space" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Release">
<Option output="bin/Release/Space" prefix_auto="1" extension_auto="1" />
<Option working_dir="../Space" />
<Option object_output="obj/Release/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
<Add directory="C:/SDL/SDL2-2.0.9/i686-w64-mingw32/include/SDL2" />
<Add directory="C:/SDL/SDL2_image-2.0.4/i686-w64-mingw32/include/SDL2" />
<Add directory="C:/Users/Introscopia/Game Development/Space/" />
</Compiler>
<Linker>
<Add option="-s" />
<Add option="-lmingw32 -lSDL2main -lSDL2 -lSDL2_image" />
<Add directory="C:/SDL/SDL2_image-2.0.4/i686-w64-mingw32/lib" />
<Add directory="C:/SDL/SDL2-2.0.9/i686-w64-mingw32/lib" />
<Add directory="C:/Users/Introscopia/Game Development/Space/" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
</Compiler>
<Unit filename="space.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="vec2d.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="vec2d.h">
<Option compile="1" />
<Option link="1" />
</Unit>
<Extensions>
<code_completion />
<envvars />
<debugger />
<lib_finder disable_auto="1" />
</Extensions>
</Project>
</CodeBlocks_project_file>

typeahead-template-url causes page to ask for credentials

I have this Anuglar.js UI-Boostrap issue. I am trying to set up a custom pop up template using ui-bootstrap. however whenever the page loads then I get a pop up asking for me to type in my credentials again. their are no errors on the page and nothing fails to load across the network. If I try to login it says its not correct and if I cancel it logs me out of my application.
I slowly started to comment out different parts of code that I had added and found that when I commented out the ui-bootstrap property it no longer asked for credentials below is the following code with the ui-boostrap commented out.
<input type="text" #*typeahead-popup-template-url="customPopupTemplate"*# typeahead-min-length="0" typeahead-show-hint="false" uib-typeahead="d as d.name for d in bds | filter:{name:$viewValue,isDeleted:false}" typeahead-on-select="getStuffs($item)" ng-model="item.bd" ng-required="true" />
the customPopupTemplate is below which came from angulars site here (scroll down to typeahead)
http://angular-ui.github.io/bootstrap/
I originally did what the site had verbatim but still got the pop up so I put the additional markup in a partial and I load the partial on the page and I still get the same Issue. I am trying to get a custom popup to display but cant get past the website asking for credentials. I am a bit lost here and not sure where to go. Any help would be greatly appreciated.
<div class="col-md-12" id="customPopupTemplate">
<div class="custom-popup-wrapper"
ng-style="{top: position().top+'px', left: position().left+'px'}"
style="display: block;"
ng-show="isOpen() && !moveInProgress"
aria-hidden="{{!isOpen()}}"
>
<p class="message">select location from drop down.</p>
<ul class="dropdown-menu" role="listbox">
<li class="uib-typeahead-match" ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }"
image-checkbox ng-style="{'background-color':bgCol}" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index)" role="option" id="{{::match.id}}">
<div uib-typeahead-match index="$index" match="match" query="query" ng-style="{background-color:match.color" template-url="templateUrl"></div>
</li>
</ul>
</div>
</div>
Being prompted for credentials like this when a page loads is typically caused by the web server configuration. My guess is that you're using IIS and Windows Authentication is enabled on the website, it wants your local Windows User credentials.
Try disabling Windows Authentication and Enabling Anonymous in IIS to see if you get the same result.
Assuming you're using ASP.Net mvc, you may need to add a web.config file where your customPopupTemplate is stored. First, I would recommend renaming to
customPopupTemplate.cshtml. Then you need to add a web.config file in the area of the project where these template files are located. Something like this:
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=">
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=" requirePermission="false" />
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=" requirePermission="false" />
</sectionGroup>
</configSections>
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Optimization"/>
<add namespace="System.Web.Routing" />
</namespaces>
</pages>
</system.web.webPages.razor>
<appSettings>
<add key="webpages:Enabled" value="false" />
</appSettings>
<system.webServer>
<handlers>
<remove name="BlockViewHandler"/>
<add name="BlockViewHandler" path="*.cshtml" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
</handlers>
</system.webServer>
<system.web>
<compilation>
<assemblies>
<add assembly="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=" />
</assemblies>
</compilation>
</system.web>
</configuration>
The key is this section within system.webServer. It basically allows .cshtml files to be served by the application:
<handlers>
<remove name="BlockViewHandler"/>
<add name="BlockViewHandler" path="*.cshtml" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
</handlers>

Using Entity Type for Profile Variable in Watson Dialog

I noticed that we can use Watson EntityType to extract time reference from user input, e.g.:
<folder label="Invite Time">
<output id="output_invite_time">
<prompt>
<item>What time is your meeting?</item>
</prompt>
<getUserInput>
<input>
<grammar>
<item>$ (DATE_TIME_RANGE)={var-invite_time}</item>
</grammar>
<action varName="var-invite_time" operator="SET_TO">{var-invite_time.value:FROM_TIME}</action>
<goto ref="output_invite_date"/>
</input>
<output>
<prompt>
<item>I'll need a valid time to continue.</item>
</prompt>
<goto ref="output_invite_time"/>
</output>
</getUserInput>
</output>
</folder>
I'm trying to figure out how to use other (supported?) EntityTypes like Generic, Location, Amount, etc. But the result is sometimes unexpected. For example "nice house in Denver, Colorado" for Location entity results in "nice"; or specifying "yesterday" for date results in incorrect date.
My simplified dialog file as follow:
<?xml version="1.0" encoding="UTF-8"?>
<dialog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="WatsonDialogDocument_1.0.xsd">
<flow>
<folder label="Main" id="Main">
<output id="start">
<prompt selectionType="RANDOM">
<item>DIALOG START - asking for user input</item>
</prompt>
<goto ref="processUserInput_start"/>
</output>
<getUserInput id="processUserInput_start">
<search ref="library_supported-intents"/>
<default>
<output>
<prompt selectionType="RANDOM">
<item>I am sorry, I did not understand your intents. Please choose intent1.</item>
</prompt>
</output>
</default>
</getUserInput>
</folder>
<folder label="Library" id="Library">
<folder label="Main Input" id="library_supported-intents">
<input>
<grammar>
<item>intent1</item>
</grammar>
<output>
<prompt selectionType="RANDOM">
<item>OK. Executing intent 1</item>
</prompt>
<goto ref="intent1-detail-generic"/>
</output>
</input>
</folder>
<folder label="Intent 1 Input Generic" id="library_intent1-generic">
<output id="intent1-detail-generic">
<prompt>
<item>Please specify generic</item>
</prompt>
<getUserInput>
<search ref="library_supported-intents"/>
<input>
<grammar>
<item>$ (ZIPCODE)={var-param_generic}</item>
</grammar>
<action varName="var-param_generic" operator="SET_TO">{var-param_generic.value:main}</action>
<goto ref="intent1-detail-location"/>
</input>
<output>
<prompt>
<item>I'll need a valid generic to continue.</item>
</prompt>
<goto ref="intent1-detail-generic"/>
</output>
</getUserInput>
</output>
</folder>
<folder label="Intent 1 Input Location" id="library_intent1-location">
<output id="intent1-detail-location">
<prompt>
<item>Please specify Location</item>
</prompt>
<getUserInput>
<search ref="library_supported-intents"/>
<input>
<grammar>
<item>$ (LOCATION)={var-param_location}</item>
</grammar>
<action varName="var-param_location" operator="SET_TO">{var-param_location.source}</action>
<goto ref="intent1-detail-amount"/>
</input>
<output>
<prompt>
<item>I'll need a valid location to continue.</item>
</prompt>
<goto ref="intent1-detail-location"/>
</output>
</getUserInput>
</output>
</folder>
<folder label="Intent 1 Input Location" id="library_intent1-amount">
<output id="intent1-detail-amount">
<prompt>
<item>Please specify Amount</item>
</prompt>
<getUserInput>
<search ref="library_supported-intents"/>
<input>
<grammar>
<item>$ (AMOUNT)={var-param_amount}</item>
</grammar>
<action varName="var-param_amount" operator="SET_TO">{var-param_amount.value:main}</action>
<goto ref="intent1-detail-time"/>
</input>
<output>
<prompt>
<item>I'll need a valid amount to continue.</item>
</prompt>
<goto ref="intent1-detail-amount"/>
</output>
</getUserInput>
</output>
</folder>
<folder label="Intent 1 Input Time" id="library_intent1-time">
<output id="intent1-detail-time">
<prompt>
<item>Please specify time</item>
</prompt>
<getUserInput>
<search ref="library_supported-intents"/>
<input>
<grammar>
<item>$ (DATE_TIME_RANGE)={var-param_time}</item>
</grammar>
<action varName="var-param_time" operator="SET_TO">{var-param_time.value:FROM_TIME}</action>
<goto ref="intent1-detail-date"/>
</input>
<output>
<prompt>
<item>I'll need a valid time to continue.</item>
</prompt>
<goto ref="intent1-detail-time"/>
</output>
</getUserInput>
</output>
</folder>
<folder label="Intent 1 Input Date" id="library_intent1-date">
<output id="intent1-detail-date">
<prompt>
<item>Please specify date</item>
</prompt>
<getUserInput>
<search ref="library_supported-intents"/>
<input>
<grammar>
<item>$ (DATE_TIME_RANGE)={var-param_date}</item>
</grammar>
<action varName="var-param_date" operator="SET_TO">{var-param_date.value:FROM_DATE}</action>
<output>
<prompt>
<item>You've specified {var-param_time} on {var-param_date}.</item>
</prompt>
</output>
<goto ref="processUserInput_start"/>
</input>
<output>
<prompt>
<item>I'll need a valid date to continue.</item>
</prompt>
<goto ref="intent1-detail-date"/>
</output>
</getUserInput>
</output>
</folder>
</folder>
<folder label="Concepts" id="Concepts"></folder>
</flow>
<entities>
<entity name="ZIPCODE" entityType="GENERIC">
<value name="10024" value="10024"/>
<value name="07928" value="07928"/>
<value name="95118" value="95118"/>
<value name="95120" value="95120"/>
<value name="uszipcode" value="!^[0-9]{5}$"/>
<entityRules></entityRules>
</entity>
</entities>
<variables>
<var_folder name="Home">
<var name="IntentClass" type="TEXT"/>
<var name="Class1" type="TEXT"/>
<var name="Class1_Confidence" type="NUMBER" initValue="0" description="Confidence score for Class1 from NL classifier"/>
<var name="var-param_date" type="TEXT" description="Date object"/>
<var name="var-param_time" type="TEXT" description="Time object"/>
<var name="var-param_generic" type="TEXT" description="Generic Object"/>
<var name="var-param_location" type="TEXT" description="Location Object"/>
<var name="var-param_amount" type="TEXT" description="Amount Object"/>
</var_folder>
</variables>
</dialog>
I'm not sure if I use it the right way given the sample tutorial only mentioned {ProfVar.value:main} or {ProfVar.value:name}. I could not find FROM_TIME and FROM_DATE for DATE_TIME_RANGE in the official documentation.
What entity types are supported and how can I properly extract entity specific info in Watson Dialog?
I'm trying to figure out how to use other (supported?) EntityTypes like Generic, Location, Amount, etc. But the result is sometimes unexpected. For example "nice house in Denver, Colorado" for Location entity results in "nice"; or specifying "yesterday" for date results in incorrect date.
"Nice" is the city in France. So it gave the correct response.
The issue is that Dialogs entity extraction is very basic. From your sample:
$ (LOCATION)={var-param_location}
This will find the first entity and stop looking. To demonstrate the limitation, lets say you want to get three possible locations within a users response.
$ (LOCATION)={var-param_location}
$ (LOCATION)={var-param_location} (LOCATION)={var-param_location2}
$ (LOCATION)={var-param_location} * (LOCATION)={var-param_location2}
$ (LOCATION)={var-param_location} (LOCATION)={var-param_location2} (LOCATION)={var-param_location3}
$ (LOCATION)={var-param_location} * (LOCATION)={var-param_location2} (LOCATION)={var-param_location3}
$ (LOCATION)={var-param_location} * (LOCATION)={var-param_location2 * (LOCATION)={var-param_location3}
$ (LOCATION)={var-param_location} (LOCATION)={var-param_location2 * (LOCATION)={var-param_location3}
As you can see, it will start getting messy real fast. It is really only meant for where you expect one entity or an explicit amount of entities being returned.
If you want to get a more accurate entity/keyword extraction, then send it to something like AlchemyAPI first. Have the API return the keyword/entities, then work with them.

Resources