Skip to content

Commit

Permalink
Adding AlphaBot.
Browse files Browse the repository at this point in the history
  • Loading branch information
farhour committed Nov 29, 2021
1 parent 0802cd6 commit 87bc229
Show file tree
Hide file tree
Showing 15,793 changed files with 3,451,262 additions and 202 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
136 changes: 136 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
# Editors
.vscode/
.idea/

# Vagrant
.vagrant/

# Mac/OSX
.DS_Store

# Windows
Thumbs.db

# Source for the following rules: https://raw.githubusercontent.com/github/gitignore/master/Python.gitignore
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Project Specific
/Output/*
!/Output/README.md
/keys/*
!/keys/README.md
!/keys/private_arqe.json
*.tar.gz
# Tests
test-d2.py
test-r2.py
22 changes: 22 additions & 0 deletions Bash/Dialogflow/data_split_with_validation.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
while getopts f:t:p: flag
do
case "${flag}" in
f) fraction=${OPTARG};;
t) testing=${OPTARG};;
p) path=${OPTARG};;
esac
done
# echo "fraction: $fraction";
source ~/venv-3.7.9-rasa/bin/activate
cd /vagrant/Rasa-Project/
# rasa data split nlu --training-fraction $fraction --out $path/split --nlu $path/data --random-seed 7322
rasa data split nlu --training-fraction $fraction --out $path/split --nlu $path/data
mkdir $path/temporary/
cp $path/split/test_data.yml $path/temporary/nlu.yml
cp $path/data/rules.yml $path/temporary/rules.yml
cp $path/data/stories.yml $path/temporary/stories.yml
mkdir $path/testing_validation/
# rasa data split nlu --training-fraction $testing --out $path/testing_validation --nlu $path/temporary --random-seed 7322
rasa data split nlu --training-fraction $testing --out $path/testing_validation --nlu $path/temporary
rm -rf $path/temporary/
deactivate
10 changes: 10 additions & 0 deletions Bash/Dialogflow/make_data_for_train.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
while getopts t: flag
do
case "${flag}" in
t) timestamp=${OPTARG};;
esac
done
mkdir /vagrant/Output/$timestamp/train/
cp /vagrant/Output/$timestamp/split/training_data.yml /vagrant/Output/$timestamp/train/nlu.yml
cp /vagrant/Output/$timestamp/data/rules.yml /vagrant/Output/$timestamp/train/rules.yml
cp /vagrant/Output/$timestamp/data/stories.yml /vagrant/Output/$timestamp/train/stories.yml
9 changes: 9 additions & 0 deletions Bash/Dialogflow/make_data_for_train_from_new_nlu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
while getopts t:f: flag
do
case "${flag}" in
t) timestamp=${OPTARG};;
f) file=${OPTARG};;
esac
done
mkdir $timestamp/re-train/
cp $timestamp/engineer/$file $timestamp/re-train/nlu.yml
4 changes: 4 additions & 0 deletions Bash/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Bash: Bash scripts needed to run the system.

This directory contains all the bash scripts that are needed as a part of Python scripts. You do not need to run these
scripts directly. The main Python scripts will run them when needed. So, keep these scripts unchanged.
10 changes: 10 additions & 0 deletions Bash/Rasa/make_data_for_train.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
while getopts t: flag
do
case "${flag}" in
t) timestamp=${OPTARG};;
esac
done
mkdir /vagrant/Output/$timestamp/train/
cp /vagrant/Output/$timestamp/split/training_data.yml /vagrant/Output/$timestamp/train/nlu.yml
cp /vagrant/Output/$timestamp/data/rules.yml /vagrant/Output/$timestamp/train/rules.yml
cp /vagrant/Output/$timestamp/data/stories.yml /vagrant/Output/$timestamp/train/stories.yml
11 changes: 11 additions & 0 deletions Bash/Rasa/make_data_for_train_from_new_nlu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
while getopts t:f: flag
do
case "${flag}" in
t) timestamp=${OPTARG};;
f) file=${OPTARG};;
esac
done
mkdir /vagrant/Output/$timestamp/re-train/
cp /vagrant/Output/$timestamp/engineer/$file /vagrant/Output/$timestamp/re-train/nlu.yml
cp /vagrant/Output/$timestamp/data/rules.yml /vagrant/Output/$timestamp/re-train/rules.yml
cp /vagrant/Output/$timestamp/data/stories.yml /vagrant/Output/$timestamp/re-train/stories.yml
11 changes: 11 additions & 0 deletions Bash/Rasa/make_data_for_train_from_new_nlu_rq2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
while getopts p:f: flag
do
case "${flag}" in
p) path=${OPTARG};;
f) file=${OPTARG};;
esac
done
mkdir $path/re-train/
cp $path/engineer/$file $path/re-train/nlu.yml
cp /vagrant/Dataset/Paper/rules.yml $path/re-train/rules.yml
cp /vagrant/Dataset/Paper/stories.yml $path/re-train/stories.yml
10 changes: 10 additions & 0 deletions Bash/Rasa/make_data_for_train_rq2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
while getopts p: flag
do
case "${flag}" in
p) path=${OPTARG};;
esac
done
mkdir $path/train/
cp $path/split/training_data.yml $path/train/nlu.yml
cp $path/data/rules.yml $path/train/rules.yml
cp $path/data/stories.yml $path/train/stories.yml
22 changes: 22 additions & 0 deletions Bash/Rasa/rasa_data_split_with_validation.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
while getopts f:t:p: flag
do
case "${flag}" in
f) fraction=${OPTARG};;
t) testing=${OPTARG};;
p) path=${OPTARG};;
esac
done
# echo "fraction: $fraction";
source ~/venv-3.7.9-rasa/bin/activate
cd /vagrant/Rasa-Project/
# rasa data split nlu --training-fraction $fraction --out $path/split --nlu $path/data --random-seed 7322
rasa data split nlu --training-fraction $fraction --out $path/split --nlu $path/data
mkdir $path/temporary/
cp $path/split/test_data.yml $path/temporary/nlu.yml
cp $path/data/rules.yml $path/temporary/rules.yml
cp $path/data/stories.yml $path/temporary/stories.yml
mkdir $path/testing_validation/
# rasa data split nlu --training-fraction $testing --out $path/testing_validation --nlu $path/temporary --random-seed 7322
rasa data split nlu --training-fraction $testing --out $path/testing_validation --nlu $path/temporary
rm -rf $path/temporary/
deactivate
12 changes: 12 additions & 0 deletions Bash/Rasa/rasa_incremental_train.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
while getopts m:d:o: flag
do
case "${flag}" in
m) model=${OPTARG};;
d) data=${OPTARG};;
o) out=${OPTARG};;
esac
done
source ~/venv-3.7.9-rasa/bin/activate
cd /vagrant/Rasa-Project/
rasa train nlu --finetune $model --config config.yml --nlu $data --out $out --epoch-fraction 0.5
deactivate
12 changes: 12 additions & 0 deletions Bash/Rasa/rasa_test_model.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
while getopts t:o:m: flag
do
case "${flag}" in
t) test=${OPTARG};;
o) out=${OPTARG};;
m) model=${OPTARG};;
esac
done
source ~/venv-3.7.9-rasa/bin/activate
cd /vagrant/Rasa-Project/
rasa test nlu --nlu $test --out $out --model $model --config /vagrant/Rasa-Project/config.yml
deactivate
11 changes: 11 additions & 0 deletions Bash/Rasa/rasa_train_from_scratch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
while getopts d:o: flag
do
case "${flag}" in
d) data=${OPTARG};;
o) out=${OPTARG};;
esac
done
source ~/venv-3.7.9-rasa/bin/activate
cd /vagrant/Rasa-Project/
rasa train --data $data --out $out --config /vagrant/Rasa-Project/config.yml
deactivate
Loading

0 comments on commit 87bc229

Please sign in to comment.