Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2022-158
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2022-158
2022-158
Commits
c04ae0a6
Commit
c04ae0a6
authored
Oct 09, 2022
by
Thushara Thiwanka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UPDATE: variable name changes
parent
fac17323
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
11 deletions
+6
-11
backend/database.db
backend/database.db
+0
-0
backend/services/class_diagram_generation_service.py
backend/services/class_diagram_generation_service.py
+1
-1
backend/services/question_preprocess_service.py
backend/services/question_preprocess_service.py
+5
-10
No files found.
backend/database.db
View file @
c04ae0a6
No preview for this file type
backend/services/class_diagram_generation_service.py
View file @
c04ae0a6
...
...
@@ -53,7 +53,7 @@ def generate_diagram(filename):
print
(
Exception
)
# generate python file for the class
# generate python file for the class
(pyreverse)
def
generate_class
(
actors
,
data
):
res
=
create_class_methods
(
data
)
class_string_arr
=
generate_class_string_array
(
actors
,
res
)
...
...
backend/services/question_preprocess_service.py
View file @
c04ae0a6
...
...
@@ -11,11 +11,6 @@ def remove_unwanted_values(data):
return
data
# # removing duplicates
# def remove_duplicates(data):
# return list(set(data))
# punctuation removing
def
remove_punctuation
(
sentence
):
text_without_punctuation
=
[
token
for
token
in
sentence
if
not
token
.
is_punct
]
...
...
@@ -60,22 +55,22 @@ def main(scenario, assignment_type):
# remove duplicates of the actors
nouns_pronouns
=
list
(
dict
.
fromkeys
(
nouns_pronouns
))
data
=
remove_unwanted_values
(
nouns_pronouns
)
actors
=
remove_unwanted_values
(
nouns_pronouns
)
extracted_relationships
=
get_include_extend_relationships
(
splitted_actions_and_actor_array
)
actors_and_use_cases_array
=
identify_use_cases
(
cleaned_extracted_actions
)
if
assignment_type
==
1
:
generated_usecase_diagram_path
=
generate_use_case_diagram
(
data
,
extracted_relationships
,
generated_usecase_diagram_path
=
generate_use_case_diagram
(
actors
,
extracted_relationships
,
actors_and_use_cases_array
)
return
generated_usecase_diagram_path
elif
assignment_type
==
2
:
generated_class_diagram_path
=
generate_class
(
data
,
cleaned_extracted_actions
)
generated_class_diagram_path
=
generate_class
(
actors
,
cleaned_extracted_actions
)
return
generated_class_diagram_path
elif
assignment_type
==
3
:
generated_class_diagram_path
=
generate_class
(
data
,
cleaned_extracted_actions
)
generated_usecase_diagram_path
=
generate_use_case_diagram
(
data
,
extracted_relationships
,
generated_class_diagram_path
=
generate_class
(
actors
,
cleaned_extracted_actions
)
generated_usecase_diagram_path
=
generate_use_case_diagram
(
actors
,
extracted_relationships
,
actors_and_use_cases_array
)
return
generated_class_diagram_path
,
generated_usecase_diagram_path
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment