[alicebot-developer] AIML

Helio Perroni Filho alicebot-developer@list.alicebot.org
Tue, 17 May 2005 13:47:33 -0300 (ART)


--- OSCAR XIQUES <ocuadro79@yahoo.com> escreveu:

> Hola, me llamo Oscar y estoy interesado en aprender
> a crear un interprete de AIMl, además quisiera saber
> como obtener la hora del sistema para un bot.

Welcome to the [alicebot-developer] mailing list,
Oscar. This is an international list with members from
all over the world. I hope you understand some of us
might be unable to read spanish, and so it is
advisable to write your messages in english.

The first step in creating an AIML interpreter is
reading  the AIML standard, which describes the
characteristics of the AIML language and provides
important tips on the design and implementation of
AIML interpreters. Its current version can be found
here:

http://www.alicebot.org/TR/2005/WD-aiml/

There are currently several open-source AIML
interpreters available: you can download some of them
and study their sources to get a good idea on what it
takes to write one. This page from the ALICE AI
Foundation lists most of them:

http://www.alicebot.org/downloads/

Also, you might be interested in checking my
ChatterBean, a Java-written AIML interpreter aimed at
being a developer-friendly,
easy-to-understand-and-modify tool:

http://chatterbean.bitoflife.cjb.net/

The AIML language provides the <date/> tag, which
returns the current system date and time. The task of
processing the tag, however, is the interpreter's
responsibily, and so it is inherently
implementation-dependent. In Java it would go somewhat
like this:

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

DateFormat f = new SimpleDateFormat("yyyy-MM-dd
HH:mm:ss");
return f.format(new Date());

I hope this is of some help. Write again anytime!

-- 
Ja mata ne.
Helio Perroni Filho



	
	
		
____________________________________________________Yahoo! Mail, cada vez melhor: agora com 1GB de espaço grátis! http://mail.yahoo.com.br