|
|
Member
Total posts: 4
Joined: Apr 15, 2014
|
Hi, I’m working on a new project which is a chat bot for android using the Program-Ab library. It is going pretty well, I have managed to get the chat bot working. My only issue is, that the <oob> tags dont work. If I ask it to open maps or something, It outputs some like:
<oob><map>Opening Map</map></oob>
And doesn’t open maps. How can I fix this? BTW I’m working in Java in Android Studio.
Thanks.
|
|
|
|
|
Posted: Apr 16, 2014 |
[ # 1 ]
|
|
Administrator
Total posts: 3111
Joined: Jun 14, 2010
|
Your app needs to be able to intercept the <oob> tag before it’s output to the user, and perform the contained commands from there. I’m not proficient in either Android or Java (though I’m planning on taking intensive training in Java in the near future), so I can’t assist further at this point, but maybe this bit of information will provide the proper direction.
|
|
|
|
|
Posted: Apr 16, 2014 |
[ # 2 ]
|
|
Member
Total posts: 4
Joined: Apr 15, 2014
|
Dave Morton - Apr 16, 2014: Your app needs to be able to intercept the <oob> tag before it’s output to the user, and perform the contained commands from there. I’m not proficient in either Android or Java (though I’m planning on taking intensive training in Java in the near future), so I can’t assist further at this point, but maybe this bit of information will provide the proper direction.
Thanks Dave . But How would I intercept the <oob> tag?
|
|
|
|
|
Posted: Apr 16, 2014 |
[ # 3 ]
|
|
Administrator
Total posts: 2048
Joined: Jun 25, 2010
|
Unless I am missing something obvious or it’s just how the forum is displaying your post, you need to close your oob tags like so:
<oob><map>Opening Map</map></oob>
|
|
|
|
|
Posted: Apr 16, 2014 |
[ # 4 ]
|
|
Member
Total posts: 4
Joined: Apr 15, 2014
|
Steve Worswick - Apr 16, 2014: Unless I am missing something obvious or it’s just how the forum is displaying your post, you need to close your oob tags like so <oob><map>Opening Map</map></oob>
Sorry Steve, I did do that in my AIML Files, but forgot to add them in the post. How can I solve it?
|
|
|
|
|
Posted: Apr 16, 2014 |
[ # 5 ]
|
|
Administrator
Total posts: 3111
Joined: Jun 14, 2010
|
I went ahead and added [ code ] tags (without the spaces, of course) to each of your posts, to make things a bit clearer.
As to your question, I don’t have the faintest idea, since I’m neither a Java nor Android programmer. The only suggestion I can provide is to check out any number of Java development forums that cater to those new to the language and see what you can find out there. We have some programmers here, but I’m not sure that any of them even dabble in Java (though I could be wrong).
|
|
|
|
|
Posted: Apr 16, 2014 |
[ # 6 ]
|
|
Member
Total posts: 4
Joined: Apr 15, 2014
|
Dave Morton - Apr 16, 2014: I went ahead and added [ code ] tags (without the spaces, of course) to each of your posts, to make things a bit clearer.
As to your question, I don’t have the faintest idea, since I’m neither a Java nor Android programmer. The only suggestion I can provide is to check out any number of Java development forums that cater to those new to the language and see what you can find out there. We have some programmers here, but I’m not sure that any of them even dabble in Java (though I could be wrong).
Hi Dave,
Thanks for adding the code tags
I contacted Harry Kunze at PandoraBots, he said to look at this book: http://www.packtpub.com/voice-application-development-for-android/book
Could anyone tell me if there is something in there that will help?
|
|
|
|
|
Posted: Apr 16, 2014 |
[ # 7 ]
|
|
Administrator
Total posts: 2048
Joined: Jun 25, 2010
|
You want us to read it for you?
This is what I use to display maps in CallMom:
<category> <pattern>SHOW ME A MAP OF *</pattern> <template> I think I know where <star/> is. I will open a map for you. <oob><map><star/></map></oob> </template> </category>
This works ok for me. When running on the phone, it does the following:
Human: Show me a map of London
Mitsuku: I think I know where London is. I will open a map for you. (displays a map of London)
However, if you are not using a phone to test with, it will do the following:
Human: Show me a map of London
Mitsuku: I think I know where London is. I will open a map for you. London.
|
|
|
|
|
Posted: Apr 16, 2014 |
[ # 8 ]
|
|
Administrator
Total posts: 3111
Joined: Jun 14, 2010
|
My reading that eBook won’t help you, as I wouldn’t know what to look for, and to be honest, your recent request had the tone of “do my legwork for me”, without even so much as a “please” or “thank you”, and I’m the type of person who treats demands like that with militant refusal.
Again, I urge you to take this matter up in forums that deal with Java development, as they will be better suited to giving you more beneficial assistance. You may also do a Google search for Java XML parsing (link here). Beyond that I cannot help.
|
|
|
|
|
Posted: Apr 16, 2014 |
[ # 9 ]
|
|
Member
Total posts: 4
Joined: Apr 15, 2014
|
Steve Worswick - Apr 16, 2014: You want us to read it for you?
This is what I use to display maps in CallMom:
<category> <pattern>SHOW ME A MAP OF *</pattern> <template> I think I know where <star/> is. I will open a map for you. <oob><map><star/></map></oob> </template> </category>
This works ok for me. When running on the phone, it does the following:
Human: Show me a map of London
Mitsuku: I think I know where London is. I will open a map for you. (displays a map of London)
However, if you are not using a phone to test with, it will do the following:
Human: Show me a map of London
Mitsuku: I think I know where London is. I will open a map for you. London.
Thanks Steve and Dave,
I read the book and now I have everything working fine.
Thanks for the help.
Matthew
|
|
|
|
|
Posted: Apr 17, 2014 |
[ # 10 ]
|
|
Administrator
Total posts: 3111
Joined: Jun 14, 2010
|
Glad we could be of help.
|
|
|
|