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

Freddy

  • *
  • Colossus
  • **********************
  • Posts: 5891
  • 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: 5891
  • 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: 4234
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
Virtual Health Assistant
by Art (AI News )
April 28, 2017, 06:25:13 PM
You Did get the message didn't you?
by Art (AI News )
April 28, 2017, 06:22:35 PM
Meet the People Who Train the Robots (to Do Their Own Jobs)
by Tyler (AI News )
April 28, 2017, 10:48:18 AM
Russian Military Robots
by Art (Robotics News)
April 25, 2017, 06:14:30 PM
DeepMind
by Art (AI News )
April 19, 2017, 06:19:36 PM
A Murder Posted on Facebook Prompts Outrage and Questions Over Responsibility
by Art (AI News )
April 18, 2017, 10:12:52 AM
AI based 3d scanner
by Art (AI News )
April 18, 2017, 10:04:39 AM
Artificial Earthling
by Art (AI News )
April 14, 2017, 03:49:08 PM

Users Online

11 Guests, 0 Users

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

Articles