Update modules/ui.py
Browse files- modules/ui.py +78 -0
modules/ui.py
CHANGED
@@ -18,6 +18,84 @@ from .database import get_student_data, store_analysis_result
|
|
18 |
from .morpho_analysis import get_repeated_words_colors, highlight_repeated_words, POS_COLORS, POS_TRANSLATIONS
|
19 |
from .syntax_analysis import visualize_syntax
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
##########################################################################
|
22 |
def login_page():
|
23 |
st.title("Iniciar Sesión")
|
|
|
18 |
from .morpho_analysis import get_repeated_words_colors, highlight_repeated_words, POS_COLORS, POS_TRANSLATIONS
|
19 |
from .syntax_analysis import visualize_syntax
|
20 |
|
21 |
+
#########################################################################
|
22 |
+
# Define colors for grammatical categories
|
23 |
+
POS_COLORS = {
|
24 |
+
'ADJ': '#FFA07A', # Light Salmon
|
25 |
+
'ADP': '#98FB98', # Pale Green
|
26 |
+
'ADV': '#87CEFA', # Light Sky Blue
|
27 |
+
'AUX': '#DDA0DD', # Plum
|
28 |
+
'CCONJ': '#F0E68C', # Khaki
|
29 |
+
'DET': '#FFB6C1', # Light Pink
|
30 |
+
'INTJ': '#FF6347', # Tomato
|
31 |
+
'NOUN': '#90EE90', # Light Green
|
32 |
+
'NUM': '#FAFAD2', # Light Goldenrod Yellow
|
33 |
+
'PART': '#D3D3D3', # Light Gray
|
34 |
+
'PRON': '#FFA500', # Orange
|
35 |
+
'PROPN': '#20B2AA', # Light Sea Green
|
36 |
+
'SCONJ': '#DEB887', # Burlywood
|
37 |
+
'SYM': '#7B68EE', # Medium Slate Blue
|
38 |
+
'VERB': '#FF69B4', # Hot Pink
|
39 |
+
'X': '#A9A9A9', # Dark Gray
|
40 |
+
}
|
41 |
+
|
42 |
+
POS_TRANSLATIONS = {
|
43 |
+
'es': {
|
44 |
+
'ADJ': 'Adjetivo',
|
45 |
+
'ADP': 'Adposición',
|
46 |
+
'ADV': 'Adverbio',
|
47 |
+
'AUX': 'Auxiliar',
|
48 |
+
'CCONJ': 'Conjunción Coordinante',
|
49 |
+
'DET': 'Determinante',
|
50 |
+
'INTJ': 'Interjección',
|
51 |
+
'NOUN': 'Sustantivo',
|
52 |
+
'NUM': 'Número',
|
53 |
+
'PART': 'Partícula',
|
54 |
+
'PRON': 'Pronombre',
|
55 |
+
'PROPN': 'Nombre Propio',
|
56 |
+
'SCONJ': 'Conjunción Subordinante',
|
57 |
+
'SYM': 'Símbolo',
|
58 |
+
'VERB': 'Verbo',
|
59 |
+
'X': 'Otro',
|
60 |
+
},
|
61 |
+
'en': {
|
62 |
+
'ADJ': 'Adjective',
|
63 |
+
'ADP': 'Adposition',
|
64 |
+
'ADV': 'Adverb',
|
65 |
+
'AUX': 'Auxiliary',
|
66 |
+
'CCONJ': 'Coordinating Conjunction',
|
67 |
+
'DET': 'Determiner',
|
68 |
+
'INTJ': 'Interjection',
|
69 |
+
'NOUN': 'Noun',
|
70 |
+
'NUM': 'Number',
|
71 |
+
'PART': 'Particle',
|
72 |
+
'PRON': 'Pronoun',
|
73 |
+
'PROPN': 'Proper Noun',
|
74 |
+
'SCONJ': 'Subordinating Conjunction',
|
75 |
+
'SYM': 'Symbol',
|
76 |
+
'VERB': 'Verb',
|
77 |
+
'X': 'Other',
|
78 |
+
},
|
79 |
+
'fr': {
|
80 |
+
'ADJ': 'Adjectif',
|
81 |
+
'ADP': 'Adposition',
|
82 |
+
'ADV': 'Adverbe',
|
83 |
+
'AUX': 'Auxiliaire',
|
84 |
+
'CCONJ': 'Conjonction de Coordination',
|
85 |
+
'DET': 'Déterminant',
|
86 |
+
'INTJ': 'Interjection',
|
87 |
+
'NOUN': 'Nom',
|
88 |
+
'NUM': 'Nombre',
|
89 |
+
'PART': 'Particule',
|
90 |
+
'PRON': 'Pronom',
|
91 |
+
'PROPN': 'Nom Propre',
|
92 |
+
'SCONJ': 'Conjonction de Subordination',
|
93 |
+
'SYM': 'Symbole',
|
94 |
+
'VERB': 'Verbe',
|
95 |
+
'X': 'Autre',
|
96 |
+
}
|
97 |
+
}
|
98 |
+
|
99 |
##########################################################################
|
100 |
def login_page():
|
101 |
st.title("Iniciar Sesión")
|