Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jtlicardo/process-visualizer
Converting textual descriptions of processes into simplified BPMN diagrams
https://github.com/jtlicardo/process-visualizer
bert bpmn nlp openai spacy
Last synced: about 1 month ago
JSON representation
Converting textual descriptions of processes into simplified BPMN diagrams
- Host: GitHub
- URL: https://github.com/jtlicardo/process-visualizer
- Owner: jtlicardo
- License: mit
- Created: 2023-01-05T15:44:05.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-21T08:53:06.000Z (about 1 year ago)
- Last Synced: 2023-12-21T11:38:59.884Z (about 1 year ago)
- Topics: bert, bpmn, nlp, openai, spacy
- Language: Python
- Homepage:
- Size: 952 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Process visualizer
This is an application that aims to convert textual descriptions of processes into simplified BPMN diagrams. The application uses NLP tools like spaCy and a fine-tuned BERT model for token classification to extract key information from the text. Additionally, the application leverages OpenAI's models such as `gpt-3.5-turbo` and `gpt-4` to perform advanced tasks related to process description analysis. Finally, Graphviz is used to produce the final diagram.
The app supports the following BPMN elements:
* tasks
* exclusive gateways
* parallel gateways
* start and end events## How to run
1. Clone the repo
1. Download and install [Graphviz](https://graphviz.org/download/), add Graphviz to the system PATH
1. Install the required dependencies: `pip install -r requirements.txt`
1. Download the necessary spaCy models:
`python -m spacy download en_core_web_sm`
`python -m spacy download en_core_web_md`
1. Create an .env file in the root of the `src` folder with your OpenAI API key as an environment variable: `OPENAI_KEY=`
1. Run the script by running `python .\src\main.py -t "Textual description of the process"`. Alternatively, you can run the script by providing a path to a file containing the textual description of the process: `python .\src\main.py -f `## Example inputs and outputs
### Example #1
*The process begins when the student logs in to the university's website. He then takes an online exam. After that, the system grades it. If the student scores below 60%, he takes the exam again. If the student scores 60% or higher on the exam, the professor enters the grade.*
Show output
---
### Example #2
*The customer decides if he wants to finance or pay in cash. If the customer chooses to finance, the customer will need to fill out a loan application. After that, the customer sends the application to the bank. If the customer chooses to pay in cash, the customer will need to bring the total cost of the car to the dealership in order to complete the transaction. After the customer has chosen to finance or pay in cash, the customer must sign the contract before the transaction is completed.*
Show output
---
### Example #3
*The manager sends the mail to the supplier and prepares the documents. At the same time, the
customer searches for the goods and picks up the goods.*Show output
---
### Example #4
*The customer decides if he wants to finance or pay in cash. If the customer chooses to finance, two activities will happen in parallel: the customer will fill out a loan application and the manager will check the customer's info. If the customer chooses to pay in cash, the customer will need to bring the total amount to the dealership in order to complete the transaction.*
Show output
---
### Example #5
*The process starts when the R&D team generates ideas for new products. At this point, 3 things occur in parallel: the first thing is the engineering team analyzing the ideas for feasibility. The engineering team also creates the technical specification. The second path involves the marketing team conducting market research for the ideas. At the same time, the design team creates visual concepts for the potential products. The third path sees the financial analysts reviewing the potential cost of the ideas. Once each track has completed its analysis, the management reviews the findings of the analysis.*
Show output
---
### Example #6
*The company receives the order from the customer. If the product is out of stock, the customer receives a notification that the order cannot be fulfilled. If the product is in stock and the payment succeeds, the company processes and ships the order. If the product is in stock, but the payment fails, the customer receives a notification that the order cannot be processed.*
Show output