prosodic
prosodic copied to clipboard
isIambic is incorrect
The isIambic
function is just looking at the first two stresses which may not be consistent across the whole line. Furthermore, it seems inconsistent to have the iambic meter but not trochaic, anapaestic and dactylic. I could rewrite them in a more general way because I'll have some wrapper for it in my application anyway. However, I am not sure if these kinds of PR are welcomed in this repo and whether someone has time to merge them.
def isIambic(self):
if len(self.positions) < 2:
return None
else:
return self.positions[0].meterVal == 'w' and self.positions[1].meterVal == 's'