radomirbosak / duden

CLI for http://duden.de dictionary written in Python
MIT License
99 stars 19 forks source link

Add word pronunciation stress/emphasis info #100

Open radomirbosak opened 4 years ago

radomirbosak commented 4 years ago

See e.g. Kragen: https://www.duden.de/rechtschreibung/Krage#aussprache

I'm not sure how it should be formatted though. So far I've encountered just words with dot (short stress) or a bar under some of their letters.

Maybe something like this?

>>> word.pronunciation
[
"Kr", "",
"a", ".",
"nkenwagen", ""
]

This is just the Betonung part, in the pronunciation, there's also a Lautschrift part which is the IPA pronunciation of the word. Parsing that would also be useful.

radomirbosak commented 2 years ago

Note that IPA pronunciation data was added in #136

radomirbosak commented 2 years ago

A screenshot of the location of the emphasis part of the page: image