Kwabs
October 6, 2022, 12:08am
1
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
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
Kwabs
June 25, 2023, 6:42am
6
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β)