fixed bug in dictionary tab where suggestions were from wrong file
Browse files
app.py
CHANGED
|
@@ -21,11 +21,15 @@ def load_lsj_dict():
|
|
| 21 |
def load_all_models_words():
|
| 22 |
return sorted(load_compressed_word_list('corpora/compass_filtered.pkl.gz'), key=custom_sort)
|
| 23 |
|
| 24 |
-
|
| 25 |
@st.cache_data
|
| 26 |
def load_models_for_word_dict():
|
| 27 |
return word_in_models_dict('corpora/compass_filtered.pkl.gz')
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
# Load compressed word list
|
| 30 |
all_models_words = load_all_models_words()
|
| 31 |
|
|
@@ -184,14 +188,14 @@ elif active_tab == "3D graph":
|
|
| 184 |
elif active_tab == "Dictionary":
|
| 185 |
|
| 186 |
with st.container():
|
| 187 |
-
|
| 188 |
|
| 189 |
# query_word = st.multiselect("Search a word in the LSJ dictionary", all_lemmas, max_selections=1)
|
| 190 |
|
| 191 |
query_tag = st_tags(label = 'Search a word in the LSJ dictionary',
|
| 192 |
text = '',
|
| 193 |
value = [],
|
| 194 |
-
suggestions =
|
| 195 |
maxtags = 1,
|
| 196 |
key = '1'
|
| 197 |
)
|
|
|
|
| 21 |
def load_all_models_words():
|
| 22 |
return sorted(load_compressed_word_list('corpora/compass_filtered.pkl.gz'), key=custom_sort)
|
| 23 |
|
|
|
|
| 24 |
@st.cache_data
|
| 25 |
def load_models_for_word_dict():
|
| 26 |
return word_in_models_dict('corpora/compass_filtered.pkl.gz')
|
| 27 |
|
| 28 |
+
|
| 29 |
+
@st.cache_data
|
| 30 |
+
def load_all_lemmas():
|
| 31 |
+
return load_compressed_word_list('all_lemmas.pkl.gz')
|
| 32 |
+
|
| 33 |
# Load compressed word list
|
| 34 |
all_models_words = load_all_models_words()
|
| 35 |
|
|
|
|
| 188 |
elif active_tab == "Dictionary":
|
| 189 |
|
| 190 |
with st.container():
|
| 191 |
+
all_lemmas = load_all_lemmas()
|
| 192 |
|
| 193 |
# query_word = st.multiselect("Search a word in the LSJ dictionary", all_lemmas, max_selections=1)
|
| 194 |
|
| 195 |
query_tag = st_tags(label = 'Search a word in the LSJ dictionary',
|
| 196 |
text = '',
|
| 197 |
value = [],
|
| 198 |
+
suggestions = all_lemmas,
|
| 199 |
maxtags = 1,
|
| 200 |
key = '1'
|
| 201 |
)
|