[alicebot-style] Problem with "*"
Anne Kootstra
alicebot-style@list.alicebot.org
Mon, 21 Nov 2005 20:35:33 +0100
This is a multi-part message in MIME format.
------=_NextPart_000_000E_01C5EEDB.225D3730
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
What you are looking for is the multi-star function. It is allowed to have
more than one star. This way the first star will catch the first word, and
the consecutive words are stored in the second star. Below is an example of
an AIML script that might suit your need.
As ever,
Anne
_____
Van: Francis Grenier [mailto:fgrenier135@gmail.com]
Verzonden: maandag 21 november 2005 20:03
Aan: alicebot-style@list.alicebot.org
Onderwerp: [alicebot-style] Problem with "*"
Hi, I would like to know if there's a possibility to know how many words
matched with a "*" in <pattern ... </pattern>?
Example:
<category>
<pattern>MY NAME IS * </pattern>
<template>
<srai>CALL ME <star/></srai>
</template>
</category>
I would like to match "My name is Frank, but not My name is Frank Grenier"
I don't know how to check how many words matched with the star... If I could
verify it, that can solve my problem...
Can you help me?
Thanks in advance
Francis
P.S. Sorry for my english
------=_NextPart_000_000E_01C5EEDB.225D3730
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.E-mailStijl18
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@page Section1
{size:595.3pt 841.9pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=3DNL link=3Dblue vlink=3Dpurple>
<div class=3DSection1>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-GB
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>What you are =
looking for
is the multi-star function. It is allowed to have more than one star. =
This way
the first star will catch the first word, and the consecutive words are =
stored
in the second star. Below is an example of an AIML script that might =
suit your
need.<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-GB
style=3D'font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p>=
</span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>As =
ever,<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><br>
Anne<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><font =
size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'>
<hr size=3D2 width=3D"100%" align=3Dcenter tabindex=3D-1>
</span></font></div>
<p class=3DMsoNormal><b><font size=3D2 face=3DTahoma><span =
style=3D'font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>Van:</span></font></b><font =
size=3D2
face=3DTahoma><span style=3D'font-size:10.0pt;font-family:Tahoma'> =
Francis Grenier
[mailto:fgrenier135@gmail.com] <br>
<b><span style=3D'font-weight:bold'>Verzonden:</span></b> maandag 21 =
november
2005 20:03<br>
<b><span style=3D'font-weight:bold'>Aan:</span></b>
alicebot-style@list.alicebot.org<br>
<b><span style=3D'font-weight:bold'>Onderwerp:</span></b> =
[alicebot-style]
Problem with "*"</span></font><o:p></o:p></p>
</div>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><span class=3Dsbmessagebody><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'>Hi, I would like to know if there's a =
possibility to
know how many words matched with a "*" in <pattern ...
</pattern>?</span></font></span><br>
<br>
<span class=3Dsbmessagebody>Example: </span><br>
<span class=3Dsbmessagebody><category></span><br>
<span class=3Dsbmessagebody><pattern>MY NAME IS * </pattern> =
</span><br>
<span class=3Dsbmessagebody><template></span><br>
<span class=3Dsbmessagebody><srai>CALL ME =
<star/></srai></span><br>
<span class=3Dsbmessagebody></template></span><br>
<span class=3Dsbmessagebody></category></span><br>
<br>
<span class=3Dsbmessagebody>I would like to match "My name is =
Frank, but not
My name is Frank Grenier" </span><br>
<span class=3Dsbmessagebody>I don't know how to check how many words =
matched with
the star... If I could verify it, that can solve my problem... =
</span><br>
<br>
<span class=3Dsbmessagebody>Can you help me?</span><br>
<span class=3Dsbmessagebody>Thanks in advance</span><br>
<br>
<span class=3Dsbmessagebody>Francis</span><br>
<br>
<span class=3Dsbmessagebody>P.S. Sorry for my english</span> =
<o:p></o:p></p>
</div>
</body>
</html>
------=_NextPart_000_000E_01C5EEDB.225D3730--