File size: 7,139 Bytes
09bd622 a2098f6 09bd622 a2098f6 09bd622 a2098f6 93381b2 3fbd370 93381b2 09bd622 a2098f6 09bd622 93381b2 7f4543e 93381b2 09bd622 678ba22 09bd622 678ba22 09bd622 678ba22 09bd622 6b202aa addad29 93381b2 b7ade80 93381b2 b7ade80 93381b2 b7ade80 93381b2 09bd622 addad29 93381b2 09bd622 c58df45 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
# modules/__init__.py
def load_auth_functions():
from .auth.auth import authenticate_student, register_student, update_student_info, delete_student
return {
'authenticate_student': authenticate_student,
'register_student': register_student,
'update_student_info': update_student_info,
'delete_student': delete_student
}
def load_database_functions():
from .database.database_init import (
initialize_database_connections
)
from .database.sql_db import (
create_student_user,
get_student_user,
update_student_user,
delete_student_user,
store_application_request,
store_student_feedback
)
from .database.mongo_db import (
get_collection,
insert_document,
find_documents,
update_document,
delete_document,
)
from .database.morphosintax_mongo_db import (
store_student_morphosyntax_result,
get_student_morphosyntax_analysis,
update_student_morphosyntax_analysis,
delete_student_morphosyntax_analysis,
get_student_morphosyntax_data
)
from .database.semantic_mongo_db import (
store_student_semantic_result,
get_student_semantic_analysis,
update_student_semantic_analysis,
delete_student_semantic_analysis,
get_student_semantic_data
)
from .database.discourse_mongo_db import (
store_student_discourse_result,
get_student_discourse_analysis,
update_student_discourse_analysis,
delete_student_discourse_analysis,
get_student_discourse_data
)
from .database.chat_db import store_chat_history, get_chat_history
return {
'initialize_database_connections': initialize_database_connections,
'create_student_user': create_student_user,
'get_student_user': get_student_user,
'update_student_user': update_student_user,
'delete_student_user': delete_student_user,
'store_application_request': store_application_request,
'store_student_feedback': store_student_feedback,
'get_collection': get_collection,
'insert_document': insert_document,
'find_documents': find_documents,
'update_document': update_document,
'delete_document': delete_document,
'store_student_morphosyntax_result': store_student_morphosyntax_result,
'get_student_morphosyntax_analysis': get_student_morphosyntax_analysis,
'update_student_morphosyntax_analysis': update_student_morphosyntax_analysis,
'delete_student_morphosyntax_analysis': delete_student_morphosyntax_analysis,
'get_student_morphosyntax_data': get_student_morphosyntax_data,
'store_student_semantic_result': store_student_semantic_result,
'get_student_semantic_analysis': get_student_semantic_analysis,
'update_student_semantic_analysis': update_student_semantic_analysis,
'delete_student_semantic_analysis': delete_student_semantic_analysis,
'get_student_semantic_data': get_student_semantic_data,
'store_chat_history': store_chat_history,
'get_chat_history': get_chat_history,
'store_student_discourse_result': store_student_discourse_result,
'get_student_discourse_analysis': get_student_discourse_analysis,
'update_student_discourse_analysis': update_student_discourse_analysis,
'delete_student_discourse_analysis': delete_student_discourse_analysis,
'get_student_discourse_data': get_student_discourse_data
}
def load_ui_functions():
# No importamos nada de ui.py aqu铆
return {} # Retornamos un diccionario vac铆o
def load_student_activities_functions():
from .studentact.student_activities import display_student_progress
return {
'display_student_progress': display_student_progress
}
def load_morphosyntax_functions():
from .morphosyntax.morphosyntax_interface import (
display_morphosyntax_interface,
display_morphosyntax_results
)
from .morphosyntax.morphosyntax_process import (
process_morphosyntactic_input,
format_analysis_results,
perform_advanced_morphosyntactic_analysis # A帽adir esta funci贸n
)
return {
'display_morphosyntax_interface': display_morphosyntax_interface,
'display_morphosyntax_results': display_morphosyntax_results,
'process_morphosyntactic_input': process_morphosyntactic_input,
'format_analysis_results': format_analysis_results,
'perform_advanced_morphosyntactic_analysis': perform_advanced_morphosyntactic_analysis
}
def load_semantic_functions():
from modules.semantic.semantic_interface import (
display_semantic_interface,
display_semantic_results
)
from modules.semantic.semantic_process import (
process_semantic_input,
format_semantic_results
)
return {
'display_semantic_interface': display_semantic_interface,
'display_semantic_results': display_semantic_results,
'process_semantic_input': process_semantic_input,
'format_semantic_results': format_analysis_results,
}
def load_discourse_functions():
from modules.discourse.discourse_interface import (
display_discourse_interface,
display_discourse_results
)
from modules.discourse.discourse_process import (
perform_discourse_analysis, # Este es el nombre correcto de la funci贸n
extract_key_concepts, # Funci贸n adicional que necesitamos
generate_concept_graph, # Funci贸n adicional que necesitamos
calculate_similarity_matrix # Funci贸n adicional que necesitamos
)
return {
'display_discourse_interface': display_discourse_interface,
'display_discourse_results': display_discourse_results,
'perform_discourse_analysis': perform_discourse_analysis,
'extract_key_concepts': extract_key_concepts,
'generate_concept_graph': generate_concept_graph,
'calculate_similarity_matrix': calculate_similarity_matrix
}
def load_admin_functions():
from .admin.admin_ui import admin_page
return {
'admin_page': admin_page
}
def load_utils_functions():
from .utils.spacy_utils import load_spacy_models
return {
'load_spacy_models': load_spacy_models
}
def load_chatbot_functions():
from .chatbot.chatbot import initialize_chatbot, process_chat_input
return {
'initialize_chatbot': initialize_chatbot,
'process_chat_input': process_chat_input
}
# Funci贸n para cargar todas las funciones
def load_all_functions():
return {
**load_auth_functions(),
**load_database_functions(),
# **load_ui_functions(),
**load_admin_functions(),
**load_morphosyntax_functions(),
**load_semantic_functions(),
**load_discourse_functions(),
**load_utils_functions(),
**load_chatbot_functions(),
**load_student_activities_functions()
} |