diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 06ae90d..9618dd2 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -3,6 +3,10 @@
+
+
+
+
@@ -32,8 +36,8 @@
-
-
+
+
@@ -41,7 +45,7 @@
-
+
@@ -50,8 +54,8 @@
-
-
+
+
@@ -60,8 +64,28 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -102,8 +126,8 @@
-
-
+
+
@@ -112,10 +136,10 @@
-
+
-
-
+
+
@@ -200,17 +224,12 @@
- _accent_classification
- wrong
- wrong_word
- predict
get_ensemble_type_predictions
_convert_to_multext_east_v4
_split_consonants
UNRECOGNIZED
word_glob_num
convert_multext
- _syllable_generator
generator
_x
bidirectional_basic_input
@@ -230,6 +249,11 @@
reverse_inputs
index
x_sy
+ _letter_generator
+ translator
+ _bidirectional_architectural_input
+ print
+ _syllable_generator
@@ -252,10 +276,11 @@
-
+
+
@@ -368,14 +393,136 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -669,31 +816,11 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -987,16 +1114,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -1005,6 +1122,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -1015,24 +1142,40 @@
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1040,7 +1183,7 @@
-
+
diff --git a/prepare_data.py b/prepare_data.py
index 3d37371..7c8a5c8 100644
--- a/prepare_data.py
+++ b/prepare_data.py
@@ -669,7 +669,15 @@ class Data:
loc += 1
if len(input_x_stack) > batch_size:
gen_orig_x = translator[np.array(input_x_stack[:batch_size])]
- yield ([gen_orig_x, np.array(input_x_other_features_stack[:batch_size])], np.array(input_y_stack)[:batch_size])
+
+ if self._bidirectional_architectural_input:
+ split_orig_x = np.hsplit(gen_orig_x, 2)
+ yield ([split_orig_x[0], split_orig_x[1], np.array(input_x_other_features_stack[:batch_size])],
+ np.array(input_y_stack)[:batch_size])
+ else:
+ yield ([gen_orig_x, np.array(input_x_other_features_stack[:batch_size])], np.array(input_y_stack)[:batch_size])
+
+ # yield ([gen_orig_x, np.array(input_x_other_features_stack[:batch_size])], np.array(input_y_stack)[:batch_size])
input_x_stack = input_x_stack[batch_size:]
input_x_other_features_stack = input_x_other_features_stack[batch_size:]
input_y_stack = input_y_stack[batch_size:]
@@ -684,7 +692,15 @@ class Data:
if len(input_x_stack) == 0:
continue
gen_orig_x = translator[np.array(input_x_stack)]
- yield ([gen_orig_x, np.array(input_x_other_features_stack)], np.array(input_y_stack))
+
+ if self._bidirectional_architectural_input:
+ split_orig_x = np.hsplit(gen_orig_x, 2)
+ yield ([split_orig_x[0], split_orig_x[1], np.array(input_x_other_features_stack)],
+ np.array(input_y_stack))
+ else:
+ yield ([gen_orig_x, np.array(input_x_other_features_stack)], np.array(input_y_stack))
+
+ # yield ([gen_orig_x, np.array(input_x_other_features_stack)], np.array(input_y_stack))
input_x_stack = []
input_x_other_features_stack = []
input_y_stack = []
@@ -692,10 +708,24 @@ class Data:
while loc < size:
if loc + batch_size >= size:
gen_orig_x = translator[orig_x[loc:size]]
- yield ([gen_orig_x, orig_x_additional[loc:size]], orig_y[loc:size])
+
+ if self._bidirectional_architectural_input:
+ split_orig_x = np.hsplit(gen_orig_x, 2)
+ yield ([split_orig_x[0], split_orig_x[1], orig_x_additional[loc:size]], orig_y[loc:size])
+ else:
+ yield ([gen_orig_x, orig_x_additional[loc:size]], orig_y[loc:size])
+
+ #yield ([gen_orig_x, orig_x_additional[loc:size]], orig_y[loc:size])
else:
gen_orig_x = translator[orig_x[loc:loc + batch_size]]
- yield ([gen_orig_x, orig_x_additional[loc:loc + batch_size]], orig_y[loc:loc + batch_size])
+
+ if self._bidirectional_architectural_input:
+ split_orig_x = np.hsplit(gen_orig_x, 2)
+ yield ([split_orig_x[0], split_orig_x[1], orig_x_additional[loc:loc + batch_size]], orig_y[loc:loc + batch_size])
+ else:
+ yield ([gen_orig_x, orig_x_additional[loc:loc + batch_size]], orig_y[loc:loc + batch_size])
+
+ #yield ([gen_orig_x, orig_x_additional[loc:loc + batch_size]], orig_y[loc:loc + batch_size])
loc += batch_size
def _get_max_syllable(self, syllable_dictionary):