[alicebot-archcomm] A test aiml fetch service for Jon

Dr. Rich Wallace alicebot-archcomm@list.alicebot.org
Wed, 13 Aug 2003 08:33:49 -0700 (PDT)


Some ArchComm members might say that this dicussion is moving way too far,
way too fast.

First of all, we've gone an implemented a new AIML tag in one AIML
interpreter, and also gone and implemented some services somwhere that are
compatible with that tag.  We've also shown some sample AIML tag that will
work with that code and with that interpreter.

Conservative Arch Comm members would say is Not the way the Arch Comm works.

There are at least half a dozen other developers out there with their own
AIML interpreters who have had no comment on these new tags and services,
no mattter what their merits, and no we have no idea whether they will
ever be implemented, no matter how cool they are.

This is the the dreaded "Embrace and Extend" that kills any standard.

I am living through a really tough experience myself right now trying to
port some AIML files from Pandorabots to Program E and finding out that
even the existing AIML standard has some big compatibility problems which
have not yet been hashed out.  For example, they each process "that"
differenlty.  Also, has anyone looked at the "Annabot" project lately? 
They have forked AIML and replaced the <that> tag with <this>.

It is worth pointing out that the volunteer who was editing the spec
document has left our community and no one has stepped forward to take
over that role.  We have already found many errors and inconsistencies.  
Some have also said that we need some kind of validation scheme to
validate the existing AIML software so that botmasters can trust that
their AIML files are portable between implementations.

A long time ago we discussed creating a "Good Housekeeping Seal of
Approval" for prgrams that implement the AIML 1.0x standard.   The idea
was the developers could submit their code to the Foundation and then get
the seal of approval so that botmasters could trust their implementation
as "official" AIML.

>> The three offered "services" have three *different* interfaces:
>> Different parameters, variables, structures. That's natural, because
>> they deal with different content. So what makes them more usable than
>> the existing interfaces offered already by external servers? What is
>> the advantage of re-inventing the wheel?
>
> Yes, I sort of agree. The only thing that needs to be standardised is a
> way to retrieve XML data .. what kind of XML data will be irrelevant.
> The other aspect to be standardised is how to turn the received XML into
> something usable .. which, in my opinion, is where XSLT comes in.
>
> I have a semi-working, non-robust implementation of _a_ possible fetch
> tag.
>
> Combining XML & XSLT makes it a very powerful and useful feature. I've
> got it working (using a hack to workaround Gary's server problems) with
> the fetchDate service, and also with Amazon.com to find books using a
> keyword search.
>
> For the quotes around "Wednesday" (and the fact that it's actually
> Thursday here), that's merely due to Gary's output format, and lack of
> specifying GMT offset (until hopefully tomorrow for him).
>
> Anyways, sample session:
>
> USER > find books about Win32 Programming
> J-ALICE > Results:
>
> Title:  Win32 System Programming: A Windows(R) 2000 Application
> Developer's Guid
> e (2nd Edition)
> Author: Johnson M. Hart
> Price:  $39.89
>
> Title:  Windows 95 Win 32 Programming Api Bible
> Author: Michael Gouker, Richard J. Simon, Brian C. Barnes
> Price:  $54.95
>
> Title:  .NET Framework Solutions: In Search of the Lost Win32 API
> Author: John Paul Mueller
> Price:  $41.99
>
> Title:  Windows 95 and Nt Win32 Api from Scratch: A Programmer's
> Workbook Author: David S. Platt
> Price:  $36.95
>
> Title:  Making WIN32 Applications Mobile
> Author: Nancy Nicolaisen
> Price:  $31.50
>
> Title:  Tomes of Delphi: WIn32 Shell API Windows 2000 Edition
> Author: John Ayres, Charles Calvert
> Price:  $41.97
>
> Title:  Dan Appleman's Visual Basic Programmer's Guide to the Win32 API
> Author: Dan Appleman, Galen A. Grimes
> Price:  $41.99
>
> Title:  Win32 Perl Programming: The Standard Extensions
> Author: Dave Roth
> Price:  $40.00
>
> Title:  Multithreading Applications in Win32: The Complete Guide to
> Threads Author: Jim Beveridge, Robert Wiener, James E. Beveridge
> Price:  $31.49
>
> Title:  Win32 Multithreaded Programming
> Author: Aaron Cohen, Mike Woodring, Ronald Petrusha
> Price:  $49.95
> USER > what day is it?
> J-ALICE > It is "Wednesday".
>
> I'm quite surprised at my results, as I'm still crashing through XSLT,
> learning how to actually write a stylesheet .. not so easy as first
> thought, but getting simpler as I write/edit them =)
>
> The two AIML categories are:
>
> <category>
> <pattern>FIND BOOKS ABOUT *</pattern>
> <template xml:space="preserve">
> Results:
> <fetch stylesheet="amazon_test.xsl">
> <url>http://xml.amazon.com/onca/xml3?t=******&amp;dev-t=********&amp;Keyword
> Search=<star index='1'
> />&amp;mode=books&amp;sort=+reviewrank&amp;offer=All&amp;type=lite&amp;page=
> &amp;f=xml</url>
> </fetch>
> </template>
> </category>
>
> <category>
> <pattern>WHAT DAY IS IT</pattern>
> <template>
> It is <fetch stylesheet="fetch_date.xsl">
> <url>http://systemscheck.com/aimlFetchServices/fetchDate.cfm?mask="dddd"</ur
> l>
> </fetch>.
> </template>
> </category>
>
> The reasons for specifying url as a child element, rather than an
> attribute is apparent in the first example, as I wouldn't be able to put
> <star/> into the url otherwise. At this point, I just added stylesheet
> as an attribute, but this might want to be an element as well. One
> reason for that could be that it could contain the stylesheet in its
> contents, rather than requiring a separate .xsl file -- however, this is
> just an experimental implementation .. nothing too serious at this
> point.
>
> The following XML is from my stylesheet for outputting the Amazon.com
> results:
>
> <?xml version="1.0"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>
> <xsl:output method="text" />
>
> <xsl:template match="ProductInfo">
> <xsl:apply-templates select="Details" />
> </xsl:template>
>
> <xsl:template match="Details" xml:space="preserve">
> Title:  <xsl:value-of select="ProductName" />
> Author: <xsl:apply-templates select="Authors/Author" />
> Price:  <xsl:value-of select="OurPrice" />
> </xsl:template>
>
> <xsl:template match="Author">
> <xsl:if test="position() != 1">, </xsl:if>
> <xsl:value-of select="current()" />
> </xsl:template>
>
> </xsl:stylesheet>
>
> Anyways, I hope this will spur some more ideas about what something like
> fetch could be like.
>
> Jon =)
>
> PS: Sorry about the long email ;-)
>
>
>