Skip to content

Commit

Permalink
remove project
Browse files Browse the repository at this point in the history
  • Loading branch information
zqhZY committed Mar 12, 2018
1 parent 769137c commit 3466835
Show file tree
Hide file tree
Showing 49 changed files with 13 additions and 50,693 deletions.
84 changes: 13 additions & 71 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,84 +1,26 @@
# rasa_chatbot
A Chinese task oriented chatbot in IVR(Interactive Voice Response) domain(电信ivr领域, 中文), Implement by rasa nlu and rasa core. This is a demo with toy dataset.

### install dependency:
- [follow here](https://github.com/zqhZY/rasa_chatbot/blob/master/INSTALL.md)
## install dependency

### dir tree
```
rasa_chatbot/
├── chat_detection # chat domain detection, todo now
├── data
│   ├── mobile_nlu_data.json # rasa nlu train data
│   ├── mobile_story.md # rasa core train data
│   └── total_word_feature_extractor.dat # mitie word vector feature
├── tools # tools for data process
├── __init__.py # init file
├── httpserver.py # rasa nlu httpserver
├── bot.py # ivr bot main script.
├── mobile_domain.yml # rasa core domain file
├── mobile_nlu_model_config.json # rasa nlu config file
├── models # directory to save trained models
└── README.md # readme file
```

### train nlu model
```bash
python bot.py train-nlu
```
#### python3
install or update to python 3

### train dialogue
```bash
python bot.py train-dialogue
#### install chinese version of rasa nlu
```
### train dialogue in online mode
```
python bot.py online_train
git clone https://github.com/crownpku/Rasa_NLU_Chi.git
cd rasa_nlu
pip install -r requirements.txt
python setup.py install
```

### test
Run command below:
```bash
python bot.py run
```
Example1:
```
Bot loaded. Type a message and press enter :
YOU:你是谁
BOT:您好!,我是机器人小热,很高兴为您服务。
YOU:我想看一下消费情况
BOT:您想查询哪个月的消费?
YOU:十月份的
BOT:好,请稍等
BOT:您好,您十月份共消费二十八元。
YOU:好谢谢
BOT:您开心我就开心
BOT:您还想干什么
YOU:没什么了
BOT:Bye, 下次再见
#### install sklearn and MITIE

```
Example2:
```
Bot loaded. Type a message and press enter :
YOU:给我看看我上月用了多少话费
BOT:好,请稍等
BOT:您好,您上月共消费二十八元。
BOT:您还想干什么
pip install -U scikit-learn sklearn-crfsuite
pip install git+https://github.com/mit-nlp/MITIE.git
```

### train word vector
#### install rasa_core

You can train your own MITIE model using following method:
```
$ git clone https://github.com/mit-nlp/MITIE.git
$ cd MITIE/tools/wordrep
$ mkdir build
$ cd build
$ cmake ..
$ cmake --build . --config Release
$ ./wordrep -e /path/to/your/folder_of_cutted_text_files
pip install rasa_core
```
/path/to/your/folder_of_cutted_text_files above is a directory path in which has word cutted data files to train. This process may cost one or two days.
Empty file removed __init__.py
Empty file.
170 changes: 0 additions & 170 deletions bot.py

This file was deleted.

117 changes: 0 additions & 117 deletions chat_detection/corpus.py

This file was deleted.

Loading

0 comments on commit 3466835

Please sign in to comment.