Class Diagram Generation

Hello Everyone,
I’m looking for a way to get GPT3 to help make class diagrams (UML) from a random text as context or any other way to get modular building blocks for designing a program.

For Example - Class Diagram Examples Created by the Creately Team | Creately

In the linked site there are examples for random projects.
Is there a way to use GPT3 as an assistant to create these?

Person
+name_string
+age_number +date of birth_number +address_string +phone num_number +gender_string
+date of join() +date of discharge()
Patient
+gender_string +prescription_string -allergies_string
+in_time() +out_time()
+name_string +address_string +phon_number
+available time() +states()
Hospital
Staff
+joined: date +qulification_string +certification_string +languages_string
+work dutes() +hoil days()
Administrative staff
+name of emp_string #details_string -time period_number
+names_string +deprt_string
+join time()
Technical staff
+name_string +location_string +join time()
+open_list() +dose_list()
Operations staff
Doctor
+name_string +addresss_string +phone_number + speciality_string
+joined_date() +dute_time()
surgen
+opr_type +free_number +block_string
+opr_time() +week period()
Nurse
+name_string +address_string +phone_number
+join_date()
Receptionist
+patient_details +problem_string +age_string
+in_time() +ot_time()
Technician
+name_string +address_string +counter_number
+opr_name() +total_opr()
Laboratorist
+name_string +test_details +time_number
+room-num() +opr_time() make tree representation of it

can you crreate diagram

erson
+name_string
+age_number +date of birth_number +address_string +phone num_number +gender_string
+date of join() +date of discharge()
Patient
+gender_string +prescription_string -allergies_string
+in_time() +out_time()
+name_string +address_string +phon_number
+available time() +states()
Hospital
Staff
+joined: date +qulification_string +certification_string +languages_string
+work dutes() +hoil days()
Administrative staff
+name of emp_string #details_string -time period_number
+names_string +deprt_string
+join time()
Technical staff
+name_string +location_string +join time()
+open_list() +dose_list()
Operations staff
Doctor
+name_string +addresss_string +phone_number + speciality_string
+joined_date() +dute_time()
surgen
+opr_type +free_number +block_string
+opr_time() +week period()
Nurse
+name_string +address_string +phone_number
+join_date()
Receptionist
+patient_details +problem_string +age_string
+in_time() +ot_time()
Technician
+name_string +address_string +counter_number

can you crreate diagram

Are you looking for ChatGPT?

https://chat.openai.com

After some discussion with bing…, Here is what Bing Suggested

(Using Google Colab ask big to generate in for pydot.graph_from_dot_data)

Import pydot library

import pydot

Create a DOT graph object from the code

dot = pydot.graph_from_dot_data(β€œβ€"
digraph class_diagram {
// Set graph attributes
graph [rankdir=BT]
// Set node attributes
node [shape=record]
// Define nodes
Person [label=β€œ{Person|+name_string\l+age_number\l+date_of_birth_number\l+address_string\l+phone_num_number\l+gender_string\l|+date_of_join()\l+date_of_discharge()\l}”]
Patient [label=β€œ{Patient|+gender_string\l+prescription_string\l-allergies_string\l|+in_time()\l+out_time()\l}”]
Hospital [label=β€œ{Hospital|+name_string\l+address_string\l+phone_number\l|+available_time()\l+states()\l}”]
Staff [label=β€œ{Staff|+joined: date\l+qualification_string\l+certification_string\l+languages_string\l|+work_duties()\l+holiday_days()\l}”]
Administrative_staff [label=β€œ{Administrative staff|+name_of_emp_string\l#details_string\l-time_period_number\l|}”]
Technical_staff [label=β€œ{Technical staff|+name_string\l+location_string\l+join_time()\l|}”]
Operations_staff [label=β€œ{Operations staff|+name_string\l+location_string\l+join_time()\l|}”]
Doctor [label=β€œ{Doctor|+name_string\l+addresss_string\l+phone_number\l +speciality_string\l|+joined_date()\l+duty_time()\l}”]
Surgeon [label=β€œ{Surgeon|opr_type\lop_free_number\lop_block_string\lop|opr_time()\lop_week_period()\lop}”]
Nurse [label=β€œ{Nurse|+name_string\l +address_string \lop_phone_number \lop | +join_date() \lop }”]
Receptionist [label=β€œ{Receptionist | +patient_details \lop_problem_string \lop_age_string \lop | +in_time() \lop_ot_time() \lop }”]
Technician [label=β€œ{Technician | +name_string \lop_address_string \lop_counter_number \lop | }”]

// Define edges
Person β†’ Patient
Person β†’ Staff
Staff β†’ Administrative_staff
Staff β†’ Technical_staff
Staff β†’ Operations_staff
Operations_staff β†’ Doctor
Operations_staff β†’ Nurse
Doctor β†’ Surgeon
Technical_staff β†’ Receptionist
Technical_staff β†’ Technician

}
β€œβ€")

Write the graph to a PNG file

dot[0].write_png(β€œhospital1.png”)

Display the graph on the screen

dot[0].write_png(β€œhospital1.png”, prog=β€œdot”)

This code will generate

1 Like