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
a68ec64c
Commit
a68ec64c
authored
Oct 10, 2022
by
Weerasinghe D.N.H
Browse files
Options
Browse Files
Download
Plain Diff
merge in to master branch
parents
465e776c
7bcede41
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
11 deletions
+27
-11
backend/.idea/dataSources.xml
backend/.idea/dataSources.xml
+17
-0
backend/.idea/misc.xml
backend/.idea/misc.xml
+4
-0
backend/backend/database.db
backend/backend/database.db
+0
-0
backend/backend/services/class_diagram_generation_service.py
backend/backend/services/class_diagram_generation_service.py
+1
-1
backend/backend/services/question_preprocess_service.py
backend/backend/services/question_preprocess_service.py
+5
-10
No files found.
backend/.idea/dataSources.xml
0 → 100644
View file @
a68ec64c
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"DataSourceManagerImpl"
format=
"xml"
multifile-model=
"true"
>
<data-source
source=
"LOCAL"
name=
"database"
uuid=
"22fcd532-5c36-4245-b274-bba2692e10d6"
>
<driver-ref>
sqlite.xerial
</driver-ref>
<synchronize>
true
</synchronize>
<jdbc-driver>
org.sqlite.JDBC
</jdbc-driver>
<jdbc-url>
jdbc:sqlite:D:\Nanduni.Bsc\research_code\2022-158\backend\backend\database.db
</jdbc-url>
<working-dir>
$ProjectFileDir$
</working-dir>
<libraries>
<library>
<url>
file://$APPLICATION_CONFIG_DIR$/jdbc-drivers/Xerial SQLiteJDBC/3.39.2/sqlite-jdbc-3.39.2.jar
</url>
</library>
</libraries>
</data-source>
</component>
</project>
\ No newline at end of file
backend/.idea/misc.xml
0 → 100644
View file @
a68ec64c
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"ProjectRootManager"
version=
"2"
project-jdk-name=
"Python 3.10"
project-jdk-type=
"Python SDK"
/>
</project>
\ No newline at end of file
backend/backend/database.db
View file @
a68ec64c
No preview for this file type
backend/backend/services/class_diagram_generation_service.py
View file @
a68ec64c
...
...
@@ -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/backend/services/question_preprocess_service.py
View file @
a68ec64c
...
...
@@ -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