dkpro / dkpro-jwktl

Java Wiktionary Library
http://dkpro.org/dkpro-jwktl/
Apache License 2.0
57 stars 26 forks source link

getting audio. #19

Closed chmeyer closed 6 years ago

chmeyer commented 9 years ago

Originally reported on Google Code with ID 19

Are there any opportunities to get audio?
I try to get audio through
IWiktionaryPage page = wkt.getPageForWord("boat");
System.out.println(page.getEntry(0).getPronunciations().get(0).getText());

but I always got the same type (IPA).

Is thhre any opportunity to get AUDIO type?

Reported by rilot77 on 2015-05-15 19:27:03

vslavik commented 9 years ago

Is thhre any opportunity to get AUDIO type?

Yes: iterate over all pronunciations instead of taking only the first one, and watch for getType() == IPronunciation.PronunciationType.AUDIO. (Make sure your build includes 4f302e81e1bb7668a98dd098bec5b1da31535490 to get it for more entries.)