Back to complete only

This commit is contained in:
Jan Nowak 2022-04-03 20:37:56 +02:00
parent 43e6edd45b
commit ecccea3cc4

13
run.py
View File

@ -128,15 +128,10 @@ def predict(search_for_words):
# left_context = trigram.split("_")[0]
# left_context_search_for_word_not_complete[bigram_not_complete] = left_context
# for search_for_word in search_for_words:
# if search_for_word in left_context_search_for_word:
# left_context = left_context_search_for_word[search_for_word]
# print(f"{left_context} {' '.join(search_for_word.split('_'))} {trigrams_complete['_'.join([left_context, search_for_word])]/bigrams_complete[search_for_word]}")
# elif search_for_word in left_context_search_for_word_not_complete:
# left_context = left_context_search_for_word[search_for_word]
# print(f"{left_context} {' '.join(search_for_word.split('_'))} {trigrams_not_complete['_'.join([left_context, search_for_word])]/bigrams_not_complete[search_for_word]}")
# else:
# print(f"??? {' '.join(search_for_word.split('_'))}")
for search_for_word in search_for_words:
if search_for_word in left_context_search_for_word:
left_context = left_context_search_for_word[search_for_word]
print(f"{left_context} {' '.join(search_for_word.split('_'))} {trigrams_complete['_'.join([left_context, search_for_word])]/bigrams_complete[search_for_word]}")
def load_dev():
# Ładowanie zbioru testującego