Added managing of ''' and ':'
This commit is contained in:
parent
ba84f30386
commit
824e58887e
|
@ -86,6 +86,7 @@ def create_syllables(word, vowels):
|
||||||
|
|
||||||
|
|
||||||
def convert_to_SAMPA(word):
|
def convert_to_SAMPA(word):
|
||||||
|
word = word.lower()
|
||||||
syllables = create_syllables(word, vowels)
|
syllables = create_syllables(word, vowels)
|
||||||
letters_in_stressed_syllable = [False] * len(word)
|
letters_in_stressed_syllable = [False] * len(word)
|
||||||
# print(syllables)
|
# print(syllables)
|
||||||
|
@ -152,6 +153,11 @@ def convert_to_SAMPA(word):
|
||||||
|
|
||||||
word = list(''.join(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
|
previous_letter_i = -1
|
||||||
letter_i = 0
|
letter_i = 0
|
||||||
next_letter_i = 1
|
next_letter_i = 1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user