|
|
|
|
|
def load_auth_functions(): |
|
from modules.auth.auth import authenticate_user, register_user |
|
return { |
|
'authenticate_user': authenticate_user, |
|
'register_user': register_user |
|
} |
|
|
|
def load_database_function(): |
|
from modules.database.database import ( |
|
initialize_mongodb_connection, |
|
get_student_data, |
|
store_application_request, |
|
store_morphosyntax_result, |
|
store_semantic_result, |
|
store_discourse_analysis_result, |
|
store_chat_history, |
|
create_admin_user, |
|
create_student_user, |
|
store_user_feedback |
|
) |
|
return { |
|
'initialize_mongodb_connection': initialize_mongodb_connection, |
|
'get_student_data': get_student_data, |
|
'store_application_request': store_application_request, |
|
'store_morphosyntax_result': store_morphosyntax_result, |
|
'store_semantic_result': store_semantic_result, |
|
'store_discourse_analysis_result': store_discourse_analysis_result, |
|
'store_chat_history': store_chat_history, |
|
'create_admin_user': create_admin_user, |
|
'create_student_user': create_student_user, |
|
'store_user_feedback': store_user_feedback, |
|
} |
|
|
|
def load_ui_functions(): |
|
from modules.ui.ui import ( |
|
main, |
|
login_register_page, |
|
login_form, |
|
register_form, |
|
user_page, |
|
display_student_progress, |
|
display_morphosyntax_analysis_interface, |
|
display_semantic_analysis_interface, |
|
display_discourse_analysis_interface, |
|
display_chatbot_interface, |
|
display_feedback_form |
|
) |
|
return { |
|
'main': main, |
|
'login_register_page': login_register_page, |
|
'login_form': login_form, |
|
'register_form': register_form, |
|
'user_page': user_page, |
|
'display_student_progress': display_student_progress, |
|
'display_morphosyntax_analysis_interface': display_morphosyntax_analysis_interface, |
|
'display_semantic_analysis_interface': display_semantic_analysis_interface, |
|
'display_discourse_analysis_interface': display_discourse_analysis_interface, |
|
'display_chatbot_interface': display_chatbot_interface, |
|
'display_feedback_form': display_feedback_form |
|
} |
|
|
|
def load_email_functions(): |
|
from modules.email.email import send_email_notification |
|
return { |
|
'send_email_notification': send_email_notification |
|
} |
|
|
|
def load_admin_functions(): |
|
from modules.admin.admin_ui import admin_page |
|
return { |
|
'admin_page': admin_page |
|
} |
|
|
|
def morpho_analysis_functions(): |
|
from modules.analysis_text.morpho_analysis import ( |
|
get_repeated_words_colors, |
|
highlight_repeated_words, |
|
POS_COLORS, |
|
POS_TRANSLATIONS, |
|
perform_advance_morphosyntax_analysis |
|
) |
|
return { |
|
'get_repeated_words_colors': get_repeated_words_colors, |
|
'highlight_repeated_words': highlight_repeated_words, |
|
'POS_COLORS': POS_COLORS, |
|
'POS_TRANSLATIONS': POS_TRANSLATIONS, |
|
'perform_advance_morphosyntax_analysis' : perform_advance_morphosyntax_analysis |
|
} |
|
|
|
def semantic_analysis_text_functions(): |
|
from modules.analysis_text.semantic_analysis import ( |
|
|
|
perform_semantic_analysis, |
|
create_semantic_graph, |
|
visualize_concept_graph, |
|
) |
|
return { |
|
|
|
'perform_semantic_analysis': perform_semantic_analysis, |
|
'create_semantic_graph': create_semantic_graph, |
|
'create_concept_graph': create_concept_graph, |
|
'visualize_concept_graph': visualize_concept_graph, |
|
} |
|
|
|
def discourse_analysis_text_functions(): |
|
from modules.analysis_text.discourse_analysis import ( |
|
perform_discourse_analysis, |
|
compare_semantic_analysis |
|
) |
|
return { |
|
'perform_discourse_analysis': perform_discourse_analysis, |
|
'compare_semantic_analysis': compare_semantic_analysis |
|
} |
|
|
|
def spacy_utils_functions(): |
|
from modules.utils.spacy_utils import load_spacy_models |
|
return { |
|
'load_spacy_models': load_spacy_models |
|
} |
|
|
|
def chatbot_functions(): |
|
from modules.chatbot.chatbot import ( |
|
initialize_chatbot, |
|
get_chatbot_response, |
|
ClaudeAPIChat |
|
) |
|
return { |
|
'initialize_chatbot': initialize_chatbot, |
|
'get_chatbot_response': get_chatbot_response, |
|
'ClaudeAPIChat': ClaudeAPIChat |
|
} |
|
|
|
|
|
def load_all_functions(): |
|
return { |
|
**load_auth_functions(), |
|
**load_database_function(), |
|
**load_ui_functions(), |
|
**load_admin_functions(), |
|
**morpho_analysis_functions(), |
|
**semantic_analysis_text_functions(), |
|
**discourse_analysis_text_functions(), |
|
**spacy_utils_functions(), |
|
**chatbot_functions() |
|
**load_email_functions() |
|
} |