jhlau / deepspeare

Code for Deep-speare: a joint neural model of poetic language, meter and rhyme
Apache License 2.0
71 stars 24 forks source link

Rhyming evaluation #2

Closed harsh19 closed 5 years ago

harsh19 commented 5 years ago

Hi,

The paper states that '''Rhyme is determined by extracting the final stressed phoneme for the paired words, and testing if their phoneme patterns match.'''

My understanding is that a stressed phoneme would end with "1" or "2".

But in the code here: https://github.com/jhlau/deepspeare/blob/master/util.py#L412 , you have stresses listed as stresses = set(["0", "1", "2"]) instead of just["1","2"]

Could you please help me in understanding the rhyming evaluation part?

Thanks!

jhlau commented 5 years ago

Footnote 21 answers your question.

harsh19 commented 5 years ago

Yes I had seen the footnote: "http://www.speech.cs.cmu.edu/cgi-bin/ cmudict. Note that the dictionary provides 3 levels of stresses: 0, 1 and 2; we collapse 1 and 2 to S+."

But '0' is supposed to mean 'No Stress': http://www.speech.cs.cmu.edu/cgi-bin/cmudict

harsh19 commented 5 years ago

Many of the libraries find the final stressed phoneme ("1" or "2" only). For example, pronouncing python library : https://github.com/aparrish/pronouncingpy/blob/master/pronouncing/__init__.py#L153

So wanted to confirm if stresses = set(["0", "1", "2"]) was intended - it seems it is. Closing the issue. Thanks.