I'm using api.ai to build a chatbot for my city (Toulouse, France) and to know when the garbage collection service is according to your address.
It works fine for every case except one :
When I type :
Quand passent les poubelles au 38 allées Jean Jaurès Toulouse ?
The resolved value for my parameter $address is just "Jean Jaurès" (it should be 38 allées Jean Jaurès Toulouse)
If I change "allées" to "rue" or "avenue", it works and I have the full address. But with "allées", no.
Something weird is that in the training panel, the resolved value shown is good.
Do you have any idea how I can fix this ?
Thanks
Related
recently I stumbled upon one of the videos of Benjamin Schumann titled: What are dynamic and action parameters and when should you use them in your AnyLogic model.
I tried to further adjust the functions of dynamic and action based parameters for a problem of mine. Just to give a heads up, I am fairly new to Anylogic (only worked through that one book, and some minor projects and tutorials) and been decent in Java (been a few years since I've been actively working in Java but currentlystarting to get back in [still rusty]).
Regarding my actual problem, in the video Mr. Schumann has an agent with three parameters. One static, one dynamic and one action. In addition to that he has a variable (double) all set in his agent. On his main is a button to increment the value of the variable with the help of the parameters and to trace the lines in the console (= giving out a string if a certain threshold of the variable is passed).
I created a similar setting, however I happen to run into a lot of variable errors during time to time while compiling.
Here some example code snippets:
dynamic parameter p_Station of the type String
v_myFahrt < 222 ? "Wiesbaden Hbf" :
v_myFahrt < 442 ? "Wiesbaden-Biebrich Bahnhof Wiesbaden Ost" :
v_myFahrt < 663 ? "Wiesbaden-Mainz-Kastel Bahnhof" :
"Hochheim (Main) Bahnhof"
therefore my variable is called v_myFahrt, a double with the initial value of 0
action parameter p_durchFahrt with the default action:
v_myFahrt = v_myFahrt + 220;
and my Button on the main:
myAgent.p_durchFahrt();
traceln(myAgent.p_Station());
So basically it is a somewhat similar code as in the reference. I tried to than add another instance of the agent with a different set of "code" for the dynamic parameter (different Strings and values) as well as a different "code" for the action parameter (e.g. + 208 instead of + 220). To then wanting to trace the lines in the console with the button again.
I tried to add
myAgent1.p_durchFahrt(); traceln(myAgent1.p_Station());
to it.
But before I coul even run it, I keep getting the error "v_myFahrt cannot be resolved to a variable" for myAgent1. Inspecting the error it keeps referring to myAgent1 with the newly added code for p_Station and I can't seem to find a way around it.
What am I doing majorly wrong here?
it looks like you have created v_myFahrt in main, right? (that would explain your symptoms).
If yes, you should create it in MyAgent instead.
I have been unsuccessful so far in getting the scripting memory to work and looking for help please.
Utterance in my test excel sheet - How can I get $app-music?
ScriptingMemory tab content:
Expectation is: Botium to send $app-music values in the utterances to the bot
Actual behaviour: Botium sending variable name ($app-music) as opposed to the values.
Please can someone help me in getting this to work? TIA.
I spotted two problems. First of all, variable names with a "-" are not allowed - only characters and numbers - see Botium Wiki - choose another variable name, $appmusic for example.
Furthermore, the Excel area scanned by Botium starts in the second row, according to your configuration, so you will have to move the scripting memory table one to the bottom.
Hey,
I want to build a IBAN converter tool for IPhones. What I mean by that is that the User has 2 textfield. One for the bank code and one for the account number.
To get the right IBAN I have to put the "Checksum" e.g 700901001234567890131400 and use the modulos 97 to get the "check digit"
in this example it is 08.
In php it looks like this:
$mod97 = bcmod($checkSum, "97");
How can I achieve the same result in Swift?
PS:
Account Number: 1234567890
Bank Account :70090100
These are not real just to mention it!
I'm running into the issues since today. The way I was keeping the user name unique was creating it as ${FACEBOOK_FIRST_NAME}_${FACEBOOK_ID} and WarpClient.GetInstance().Connect(${FACEBOOK_FIRST_NAME}_${FACEBOOK_ID}) worked just fine till now.
Today it stopped working, and after trial and error it seems that the username length is limited to 21 characters now. 22 characters user name causes CONNECTION_ERROR, 23 and more - BAD_REQUEST.
Is it a new restriction introduced, and if it is, what is the best way to maintain unique but readable user names based on users FB credentials?
10x
There are restrictions on the username string.
The length should be less than 25 and the following characters are not allowed
, ; \ /
See the API reference.
http://appwarp.shephertz.com/game-development-center/csharp-api-reference/#connect
Hope it helps.
I am trying to figure out how to parse an address using T-SQL and I suck at T-SQL. My challenge is this,
I have a table called Locations defined as follows:
- City [varchar(100)]
- State [char(2)]
- PostalCode [char(5)]
My UI has a text box in which a user can enter an address in. This address could be in the form of essentially anything (yuck, I know). Unfortunately, I cannot change this UI either. Anyways, the value of the text box is passed into the stored procedure that is responsible for parsing the address. I need to take what the person enters and get the PostalCode from the Locations table associated with their input. For the life of me, I cannot figure out how to do this. There are so many cases. For instance, the user could enter one of the following:
Chicago, IL
Chicago, IL 60601
Chicago, IL, 60601
Chicago, IL 60601 USA
Chicago, IL, 60601 USA
Chicago IL 60601 USA
New York NY 10001 USA
New York, NY 10001, USA
You get the idea. There are a lot of cases. I can't find any parsers online either. I must not be looking correctly. Can someone please point me to a parser online or explain how to do this? I'm willing to pay for a solution to this problem, but I can't find anything, I'm shocked.
Perhaps a CLR function might be a better choice than tsql. Check out http://msdn.microsoft.com/en-us/magazine/cc163473.aspx for an example of using regular expressions to parse some pretty complex string inputs into table value results. Now you get to be as creative as you please with your regex matching but the following regex should get you started:
(.*?)([A-Z]{2}),? (\d+)( USA)?$
If you're reluctant to use CLR functions, perhaps you have regex functionality in the calling system, like ASP.Net or PHP.