Home | Travaux STAF | STAF14 - Report for exercise 5 - Regular expressions STAF-E

R E P O R T

bot

Contents

Conception
The Scenario
Technical details-problems
References - Bibliography


Conception
Once more time I tortured myself to find a good idea, this time for implementation with regular expressions in Javascript :) One of my ideas that seemed really nice in the beginning and I started to implement it, was to make a First Aider on-line to give quickly guides to someone that he or someone close to is in need of immediate medical care after an accident or a sudden illness.

When I started to implement the idea, there came out all the problems... And it was then, I realised that however clever I was intending to make it, it will never be trustworthy (for real use, of course) and it was impossible for me that I'm not even a doctor :) to cover all the cases. So, I rejected the idea (and also the part I implemented) searching for new ideas.

The idea, I came out this time, is called "XML bot" and is a robot called "Pythia" (you know, the greek Pyhtia from Delphi) that tries to answer to all the potential questions about XML. The pattern I had in mind, while I was searching for ideas, was to find a theme that would be really narrow in order the questions and the possible answers to be as more specific as posible. So, when I'm saying that "Pythia" answers to questions about XML, I'm refering to questions of general interest like "What is it?", "What are the advantages?" or "Who launched it?" and so on. All the questions we are trying to answer reading an article about something new, or we're asking a colleague to explain to us.

Eventhough I was really tired after all the work I have done fot this diploma so far and with a ticket to Greece for the last 10 days of this period (starting from tomorrow!!!) I made an effort to make "Pythia":



TOP

The scenario

Introduction page:

At the beginning, the user faces a "welcome" page with a short description about Pythia and it's capabilities. I put emphasis on this unique feature of Pythia that creates new web pages on demand. From this page with the aid of a button called "Ask Pythia" the user can enter to the chat interface...

Input frame:

This is the frame where the user can ask questions to Pythia writing into a text field of a form having the casualties like Enter and Reset buttons.
I kept the initially designed buttons "Bot's memory" and "Debugging" that are helpful both to me while I was testing my script and of course for the user. I just changed the esthetics like colors and position and that was all.
I added the link "Exit" to help the navigation, and it happens the same thing when the user says "Goodbye" or "Bye" to Pythia.
Here I'm proposing also to the user to write "help" whenever he is out of ideas of what to ask.

Output frame:

It is the frame where the answers and the questions posed are printed in a form of a dialog distinguishing questions from answers with different colors. I included an automatic scroll of this frame in order to see always the last answer on the frame without having to use the scrollbar.

Bot's memory:

I didn't make any changes to this part, due to lack of time and because it seemed quite good the way it is already :)

The things that deserve to be mentioned specificaly:



TOP

Technical details - problems
Regular expressions are quite easy to understand, and to my case, I wasn't in need of very complicated ones. Eventhough, for a different subject it would be really challenging to find the best fitted pattern.

I knew from the beginning that it was impossible to do something perfect, so I didn't expect too much. The result of my "Pythia" seems quite close to my expectations. It keeps a normal conversation as long as the user uses "help" from time to time.

It took me more time to write possible answers to the patterns in the end than writing the patterns themselves :) But that is what makes it look more natural so I worked quite on it.

I would like to apologize for the possible mistakes about XML, but is a subject that I'm just started to study, so you can imagine it's not my strongest point for the moment :) But it was a good opportunity to combine both.

Having a prior experience with Javascript, things weren't difficult and I didn't have any problems worth mentioned here.


TOP

References - Bibliography - Sites



TOP

©Vivian Synteta
Last modified 12/05/99
synteta8@etu.unige.ch
Back to Travaux page