mirror of
https://github.com/wassname/pysle.git
synced 2026-06-27 16:10:05 +08:00
REFACTOR: Change print statement to print function
This commit is contained in:
+3
-3
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user