Added managing of ''' and ':'

This commit is contained in:
lkrsnik 2018-08-17 11:53:25 +02:00
parent ba84f30386
commit 824e58887e

View File

@ -86,6 +86,7 @@ def create_syllables(word, vowels):
def convert_to_SAMPA(word):
word = word.lower()
syllables = create_syllables(word, vowels)
letters_in_stressed_syllable = [False] * len(word)
# print(syllables)
@ -152,6 +153,11 @@ def convert_to_SAMPA(word):
word = list(''.join(word))
test_word = ''.join(word)
test_word = test_word.replace('"', '').replace(':', '')
if len(test_word) <= 1:
return ''.join(word)
previous_letter_i = -1
letter_i = 0
next_letter_i = 1