diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 40b8d80..23968bf 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,10 +4,9 @@
-
-
-
+
+
@@ -34,23 +33,22 @@
-
+
-
-
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -76,11 +74,11 @@
-
+
-
-
+
+
@@ -167,11 +165,6 @@
- size
- decode_x
- self._input_type ==
- ../
- math
predict
_reverse_inputs
_letter_generator
@@ -186,7 +179,6 @@
_create_x_features
force
test_and_validation_size
- _accent_classification
self.y_train
_additional_letter_attributes
np.random.seed
@@ -197,6 +189,12 @@
np.eye
allow_shuffle_vector_generation
accented_vowels
+ generate
+ generate_x_and
+ accentuate
+ _generator
+ _create_syllable_letters_translator
+ _accent_classification
@@ -217,16 +215,16 @@
-
+
-
+
-
+
@@ -243,6 +241,8 @@
+
+
@@ -257,8 +257,6 @@
-
-
@@ -521,7 +519,7 @@
-
+
@@ -542,6 +540,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -829,26 +846,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -923,10 +920,29 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/prepare_data.py b/prepare_data.py
index 487ad85..45f32e1 100644
--- a/prepare_data.py
+++ b/prepare_data.py
@@ -218,7 +218,10 @@ class Data:
if self._reverse_inputs:
syllables = syllables[::-1]
for syllable in syllables:
- index = dictionary.index(syllable)
+ if syllable in dictionary:
+ index = dictionary.index(syllable)
+ else:
+ index = 0
x[i][j] = index
j += 1
i += 1
@@ -964,6 +967,11 @@ class Data:
wrong_word,
correct_word
])
+ print(num_of_pred)
+ print(len(y))
+ print(num_of_correct_pred_words)
+ print(len(errors))
+ print(num_of_correct_pred_words + len(errors))
return (num_of_correct_pred / float(num_of_pred)) * 100, (num_of_correct_pred_words / float(len(y))) * 100, errors
def get_accentuated_letter(self, word, location, vowels, syllables=False, debug=False):