Summary: | add automatic download of pronunciation files from Wikimedia Commons | ||
---|---|---|---|
Product: | [Applications] parley | Reporter: | Piotr Kubowicz <derbeth> |
Component: | general | Assignee: | Parley Developers <parley-devel> |
Status: | REPORTED --- | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Microsoft Windows | ||
OS: | Microsoft Windows | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Perl script fetching information about pronunciation from Commons |
Description
Piotr Kubowicz
2008-11-13 19:23:14 UTC
Created attachment 28546 [details]
Perl script fetching information about pronunciation from Commons
This is my Perl script I use to fetch information about which pronunciation files are available in Wikimedia Commons for each language. It's a bit tricky, because although these files are organised into categories, they are named in a special way, which includes information about language and sometimes also dialect. So, Image:De-Buch.ogg is pronunciation of "Buch" in German (case sensitive) and Image:En-us-cat.ogg is pronunciation of "cat" in English, with US accent.
When searching for pronunciation files Parley could use one of two methods: try to guess filename on Wikimedia Commons (algorithm: get image name, add two-letter language prefix ending with pause, add ".ogg" extension; if this fails try adding dialect prefix after language prefix) or use some kind of web service on Parley server, which would use a prebuilt list of pronunciation files available for each word (a dummy method for creating such "database" is presented in my script). |