An open API service indexing awesome lists of open source software.

https://github.com/jyhong836/jacie

Jacie is a chat robot based on AIML technolodge.
https://github.com/jyhong836/jacie

Last synced: 3 months ago
JSON representation

Jacie is a chat robot based on AIML technolodge.

Awesome Lists containing this project

README

        

Jacie
====

Jacie is chat robot based on [AIML](http://en.wikipedia.org/wiki/AIML) technolodge.

A python tool, PyAIML, is used to create the robot in the server. This project is aim to be a demo including HOW TO write a chatbot, HOW TO write a HTML client of the robot using WebSocket.

You can visit the website in freeshell.ustc.edu.cn to have look at the [Jacie](http://s7.freeshell.ustc.edu.cn:20252/jacie/). Sorry to annouce that it will not work for 24 hours, the reason is:

1. Jacie is just something that I'm intersting now, it's possible that it will get lost.
2. The server, freeshell at ustc, is provided by [LUG](https://lug.ustc.edu.cn/) for the students in USTC. That means when I graduated from USTC, the server would not working any more, unless it's kept by [LUG](https://lug.ustc.edu.cn/)
3. Actually I can buy a server myself. But I think it's not worthy.

====
### Deploy

- server.py

you need run it on server to listen to the websocket request.

you need to install __aiml__ and __gevent-websocket__ first. I will introduce how to do it later.

- index.php

to make it available, you need to install the php in your system.
for example in ubuntu:

```shell
apt-get install php-cli
```

The css and javascript is refered to [Simple Chat Using WebSocket and PHP Socket](http://www.sanwebe.com/2013/05/chat-using-websocket-php-socket), which is a chatroom based on WebSocket (HTML5). I refered the code download link [here](http://www.sanwebe.com/downloads/50-websocket-example) for convinence.

You can also read my introduction about the WebSocket Chatroom:[link](https://jyhong.blog.ustc.edu.cn/2014/06/websocket%E8%81%8A%E5%A4%A9%E5%AE%A4/).

====

### AIML

A review about AIML has been writen in Chinese by Junyuan Hong. You can read it in [初探AIML](https://jyhong.blog.ustc.edu.cn/2014/06/%E5%88%9D%E6%8E%A2aiml/). The python AIML tool, PyAIML, is also introduced there.

====

### PyAIML

PyAIML is a python tool for AIML. It can learn the knowledge written in AIML from files. What really interests me is that it can save the knowledge into file end with ".brn".
(You can find the brn file at github:/aiml/standard.brn, it's a standard aiml provided and supported by PyAIML) And It can also save the session, which means the robot will remember the words you have told her. But this function is not supported by Jacie now.

You can visit [PyAIML at sourceforge](http://pyaiml.sourceforge.net/), learn more about it.

How to __install__ it:
```shell
$ git clone git://pyaiml.git.sourceforge.net/gitroot/pyaiml/pyaiml
$ cd pyaiml
$ python setup.py install
```

you can import it in python with ```import aiml```. When you want to know more about the modules, please visit the [sourceforge](http://pyaiml.sourceforge.net/).

====

### WebSocket

Since the HTML5 putted out, the websocket is available for all developers who is working on in-time-update, such as chatroom.

Although I have learned a lot from the [Simple Chat Using WebSocket and PHP Socket](http://www.sanwebe.com/2013/05/chat-using-websocket-php-socket), which is totally in php, I didn't use the php as the websocket server.

The __gevent-websocket__ is used in the server, to work more smooth with PyAIML, since they are all python code.

You can learn more about the gevent-websocket in [bitbucket](https://bitbucket.org/Jeffrey/gevent-websocket/), and clone it.

__Install__
```shell
$ pip install gevent-websocket
```

====

### page design

The design used the [Simple Chat Using WebSocket and PHP Socket](http://www.sanwebe.com/2013/05/chat-using-websocket-php-socket)'s design. The js file is used.

----

This page is written with GitHub Markdown. Learn how to write Github Markdown, please visit [GitHub Flavored Markdown](https://help.github.com/articles/github-flavored-markdown).