REFACTOR: Change print statement to print function

This commit is contained in:
timmahrt
2015-06-19 17:29:19 -05:00
parent 0e53ed654e
commit 985d68da6c
2 changed files with 9 additions and 9 deletions
+3 -3
View File
@@ -56,17 +56,17 @@ def syllabifyTextgrid(isleDict, tg, wordTierName, phoneTierName,
word,
phoneList)
except isletool.WordNotInISLE:
print "Word ('%s') not is isle -- skipping syllabification" % word
print("Word ('%s') not is isle -- skipping syllabification" % word)
continue
except (pronunciationtools.NullPronunciationError):
print "Word ('%s') has no provided pronunciation" % word
print("Word ('%s') has no provided pronunciation" % word)
continue
syllableList = returnList[1]
stressIndexList = returnList[3]
i = 0
# print syllableList
# print(syllableList)
for k, syllable in enumerate(syllableList):
# Create the syllable tier entry
+6 -6
View File
@@ -20,13 +20,13 @@ firstEntry = lookupResults[0]
firstSyllableList = firstEntry[0]
firstStressList = firstEntry[1]
print searchWord
print firstSyllableList, firstStressList # 3rd syllable carries stress
print(searchWord)
print(firstSyllableList, firstStressList) # 3rd syllable carries stress
# Here we determine the syllabification of a word, as it was said.
# (Of course, this is just a guess)
print '-'*50
print('-'*50)
searchWord = 'another'
anotherPhoneList = ['n', '@', 'th', 'r']
@@ -37,8 +37,8 @@ returnList = pronunciationtools.findBestSyllabification(isleDict,
stressedSyllable, syllableList, syllabification, stressedIndex = returnList
print searchWord
print anotherPhoneList
print syllableList # We can see the first syllable was elided
print(searchWord)
print(anotherPhoneList)
print(syllableList) # We can see the first syllable was elided