diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 10dbfe6..f8d7742 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,28 +2,12 @@ - - - - - - - - - - - - - + - - + + - - - - - + - convert_multext generator _x bidirectional_basic_input @@ -226,7 +219,6 @@ content number_of_syllables _create_syllables - reverse_inputs index x_sy _letter_generator @@ -237,8 +229,10 @@ np.concatenate test_set prepare_data - test_accuracy accent_classification + assign_stress_locations + reverse_inputs + test_accuracy @@ -270,8 +264,9 @@ @@ -296,8 +291,6 @@ - - @@ -360,7 +353,7 @@ @@ -382,11 +375,11 @@ + + @@ -679,10 +704,10 @@ - + - + @@ -726,13 +751,6 @@ - - - - - - - @@ -923,7 +941,7 @@ - + @@ -943,16 +961,6 @@ - - - - - - - - - - @@ -978,14 +986,6 @@ - - - - - - - - @@ -1004,34 +1004,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - + + - + - - - + + + + + - - + + @@ -1044,13 +1072,11 @@ - + - - - - - + + + diff --git a/prepare_data.py b/prepare_data.py index eafa31d..f6d23ac 100644 --- a/prepare_data.py +++ b/prepare_data.py @@ -968,6 +968,8 @@ class Data: decoded_x = self.decode_x(x[i], dictionary) else: decoded_x = self.decode_syllable_x(x[i], syllable_dictionary) + if self._bidirectional_basic_input: + decoded_x = decoded_x[:int(len(decoded_x)/2)] errors.append([i, decoded_x, self.decode_x_other_features(feature_dictionary, [x_other_features[i]]), @@ -988,7 +990,10 @@ class Data: if not syllables: word_list = list(word) else: - word_list = list(word)[::-1] + if self._reverse_inputs: + word_list = list(word)[::-1] + else: + word_list = list(word) vowel_num = 0 for i in range(len(word_list)): if self._is_vowel(word_list, i, vowels):