AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

trying to code a Java chat bot
 
 

Hello,

I’m trying to code a Java chat bot (in an applet), with a txt knowledge base. It’s not for the Loebner prize.
I would like to create a, more or less, “simple” chat bot for talk to visitors of website.

Did you have some suggestions, ideas to help me start this please ? I’m debutant in Java, but I’ve already code some little things.

I explain a little how I imagine the code :

The user put a phrase :
the bot search in a txt “memories”
if there’s nothing,
it search in a knowledge base,
and it does an action following the input.

Is it a good start ?

Thanks,

Patrice

 

 
  [ # 1 ]

Unfortunately, I know very little about java. I knoow that there is a java-based AIML interpreter/chatbot engine called Program D, but as you can see from the site I linked, it seems not to be actively developed. The site at aitools hasn’t been updated since 2006, after all. Still, it may be a decent starting point. smile

 

 
  [ # 2 ]

Patrice,

For the sake of discussion, there is a simple chatbot sample at: 8pla.net
which is written in JavaScript.  Oftentimes JavaScript is pretty close
to Java syntax, I think.

This JavaScript chatbot uses two dimensional arrays and regular expressions.
So, those may be two good starting points to take a look at in Java. If you view this JavaScript source, it may inspire you to do something similar in Java.

 

 
  [ # 3 ]

Thanks for the replies.

I looked at programD but it seems to old.

There’s program-ab (https://code.google.com/p/program-ab/) that seems to work with Java, but I don’t know how to use my own aiml file instead of those with the program…

I’ll look at 8pla.net, thanks wink

 

 
  [ # 4 ]

Oops? Icompletely forgot about Program AB being java based. I should be ashamed of myself. downer

One advantage of Program AB is that it uses the newer AIML 2.0 standard, wnich is more feature-rich and flexible. The learning curve for AIML 2.0 is a bit steeper, mainly because of all of the new things that are available, but if you’re new to AIML, this isn’t as daunting a task as it is for someone who’s become “set in their ways” with the older version. smile

 

 
  [ # 5 ]
Patrice Andreani - Nov 20, 2013:

There’s program-ab (https://code.google.com/p/program-ab/) that seems to work with Java, but I don’t know how to use my own aiml file instead of those with the program…

You should put your AIML files inside the AIML folder of your bot in Program AB. You should also delete the files from the AIMLIF folder as this may stop your files from compiling.

 

 
  [ # 6 ]

Don’t be ashamed wink

I’ve tryed AIML some years ago, but I can say that I’m new.

I’d like to use AIML instead of only JAVA.

The arborescence of the Super bot in program-ab is like this :

bots
super
  aiml
  aimlf
  config
  data
  maps
  sets

There’s not enought documentation about this program I think.

What should I do if I want to create my own bot with my AIML file ?
There’s a lot of txt file (in english of course, in config, maps, sets) and I don’t know if I need them.

Thanks if you could help me wink

 

 
  [ # 7 ]

I should first point out that AIML by itself cannot make a chatbot. Think of AIML files as a type of database that only holds information. You need some form of data retrieval script/code/program to not only pull the correct data from the database, but also to translate it into a form that humans can understand. That’s the job of an AIML interpreter, such as Program AB. Additionally, AIML interpreters by themselves cannot make a chatbot, either. They need some sort of data to work with, and that’s the job of the AIML file(s).

As for a lack of documentation, here’s a short list of pages that may prove useful:

https://code.google.com/p/program-ab/
http://alicebot.blogspot.com/2013/01/program-ab-aiml-20-reference.html
http://www.chatbots.org/ai_zone/viewthread/1203/

There should be enough information there to get you started. I hope this helps. smile

 

 
  [ # 8 ]

Yes, of course, I need a program to use with AIML file, I’ve understood wink
I would like to create my chatbot with a Java interface, and AIML files for knowledge base.

And, it works ! In an applet, with program-ab.

Now, I have to create the AIML file for make my bot more expressive.
For the moment, it just says “Bonjour”.

Thanks for informations and links wink

 

 
  [ # 9 ]

That’s what we’re here for. smile If you have any questions, please feel free to ask away.

 

 
  [ # 10 ]

Thanks for the help, it’s a sympathic community wink

I’ll don’t hesitate to come back if I have any questions, because now, I’ve had to learn AIML 2 to create my own bot wink

 

 
  [ # 11 ]

Program AB will also support AIML 1.0.1.
You don’t have to learn AIML 2 to use it.

 

 
  [ # 12 ]

Yes, thanks for this precision.

 

 
  [ # 13 ]

Hey patrice or anyone, I want to know if you now know how to implement aiml in java. I need to learn that because i need to make an android app which is close to a chat bot smile thanks

 

 
  [ # 14 ]

Hi chatbots.org..
I have recently build up my interest in chatbots and would love to build one. I am a java developer with less experience. So can anyone help me with getting started on this? or if anyone can provide me certain links which can help me understand that what all i need to learn in order to make a chatbot.

Thanks !

 

 

 
  [ # 15 ]

HI..can anyone reply please… :(

sonal gupta - Jul 15, 2016:

Hi chatbots.org..
I have recently build up my interest in chatbots and would love to build one. I am a java developer with less experience. So can anyone help me with getting started on this? or if anyone can provide me certain links which can help me understand that what all i need to learn in order to make a chatbot.

Thanks !

 

 1 2 > 
1 of 2
 
  login or register to react