TTUM is a program that converts sentences in natural language into a UML diagram image, using deep learning.
- Run:
$ python -m venv .venv # Create virtual environment
$ .venv/bin/activate # or '.venv\Scripts\activate' on Windows
$ pip install --upgrade pip # or 'python -m pip install --upgrade pip' on Windows to update pip
$ pip install -r requirements.txt # Get packages using requirements.txt-
Install npm.
-
Run this to install react-scripts and axios.
$ cd frontend
$ npm install --save react-scripts # Install react-scripts
$ npm install --save axios # Install axios- Remove files other than
__init__.pyfromttum/backend/api/migrations/. - Set up database
$ cd backend
$ py manage.py makemigrations
$ py manage.py migrate
$ py manage.py createsuperuser # Create superuser for the server- Create and save any value to
title,image_name,_typeto a row inTasktable in the SQLite database onlocalhost:8020/admin.
Download NLTK Data
You need to download NLTK data to use the nlp module.
- You need to uncomment
nltk.download('all')inNLPHandler.__init__innlp.pywhen you run for the first time. - When you run the program with the uncommented line, the program will download NLTK data from the NLTK server.
- Then, you can comment the line again.
- In order to use the model to translate natural language to PlantUML text, you need to train the model with the
train.csv. - Give
epochparameter ofUMLHandleran integer more than 0 at least once, to train the model and create checkpoints intraining_checkpoints/.- We recommend assigning a number bigger than 300 to the
epoch.
- We recommend assigning a number bigger than 300 to the
- Then, you can set
epoch=0again, so that the program can just restore the checkpoints to translate next time you run it. - If there is any change in
train.csv, you need to train the model again.
You need to run both the backend and frontend servers, if you wish to run TTUM on web.
$ cd backend
$ py manage.py runserver 127.0.0.1:8020$ cd frontend
$ npm run startIf you wish to run without the server, just run main.py in the backend/nlp/, which is a short demo of the image creating process.
- A tensorflow model utilizing seq2seq
- Receives
train.csvas input and trains the model.
- A data file that contains the training data for the model
- This is a file where English-to-PlantUML data should be added.
- Please add more quality data!
Please follow PEP 8 for Python codes. (4 spaces for indentation!)
-
This project works by connecting to the PlantUML server.
-
We used SamuelMarks/python-plantuml, which is forked from dougn/python-plantuml to get access to the PlantUML server using Python!
-
These are all open source projects on GitHub, so check them out!
-
Currently TTUM only works for creating usecase diagrams, so please participate in the project.

