Author Topic: Need help with srai and passing star  (Read 1269 times)

Freddy

  • *
  • Colossus
  • **********************
  • Posts: 5855
  • Mostly Harmless
Need help with srai and passing star
« on: January 30, 2013, 10:28:03 PM »
I have this code :

Code: [Select]
<?xml version="1.0" encoding="utf-8" ?>
<aiml version="1.0">

<category>
<pattern>MUSIC *</pattern>
<template><srai>MP3</srai></template>
</category>

<category>
<pattern>MP3 *</pattern>
<template>I will play <star index="1"/></template>
</category>
</aiml>

But it only partly works.

If I type 'MP3 some song' the bot will say 'I will play some song'.

I tried to use srai but I can't seem to figure out how to pass the * to the category so that this also works : 'Music some song'

Cheers   :)


Freddy

  • *
  • Colossus
  • **********************
  • Posts: 5855
  • Mostly Harmless
Re: Need help with srai and passing star
« Reply #1 on: January 30, 2013, 10:44:38 PM »
Nevermind, found it :

Code: [Select]
<?xml version="1.0" encoding="utf-8" ?>
<aiml version="1.0">

<category>
<pattern>MUSIC *</pattern>
<template><srai>MP3 <star/></srai></template>
</category>

<category>
<pattern>MP3 *</pattern>
<template>I will play <star index="1"/></template>
</category>
</aiml>

I didn't put <star/> in the first pattern..  :idiot2:
« Last Edit: January 31, 2013, 11:08:35 AM by Freddy »

Art

  • At the end of the game, the King and Pawn go into the same box.
  • *
  • Hal 4000
  • ******************
  • Posts: 4204
Re: Need help with srai and passing star
« Reply #2 on: February 01, 2013, 12:40:55 AM »
Freddy,

You've confirmed it...you really ARE your own best friend!! ;)
In the world of AI, it's the thought that counts!

 

Welcome

Please login or register.



Login with username, password and session length
A.eye
by keghn (General AI Discussion)
March 27, 2017, 09:31:23 PM
Rivescript not working as expected- solved
by brty21 (AI Programming)
March 27, 2017, 10:22:23 AM
Way before I attempt VR let me ask some questions.
by LOCKSUIT (General Project Discussion)
March 27, 2017, 05:18:49 AM
Hello All
by Art (New Users Please Post Here)
March 25, 2017, 07:50:49 PM
My DeepMind Generation
by Freddy (General Chat)
March 25, 2017, 04:16:32 AM
mini a.i puzzles
by yotamarker (General AI Discussion)
March 23, 2017, 08:12:36 PM
Solid proof why Automation is incredible.
by Art (General AI Discussion)
March 23, 2017, 05:17:09 PM
Hello all
by 8pla.net (New Users Please Post Here)
March 22, 2017, 06:06:52 PM

Users Online

19 Guests, 1 User
Users active in past 15 minutes:
kei10
[Trusty Member]

Most Online Today: 47. Most Online Ever: 208 (August 27, 2008, 08:24:30 AM)

Articles