6.5. Vocabulector: A Language-Learning Tool
The final example of this chapter is a personal language-learning tool. Let's assume you are traveling in the Basque country and you want to buy some cheese. You may find in your dictionary that cheese is 'gazta' in Basque, but you have no idea how to pronounce it correctly. Probably you would forget the word anyway before you get to a local cheese-shop.
Vocabulector solves the problem. In your hotel room, you type 'cheese' as the native word and 'gazta' as the foreign word into your Vocabulector and take a photo of a half-eaten piece of cheese. After this, you find a friendly person on the street, show her the photo and ask her to pronounce it like a native.
The correct pronunciation is recorded by Vocabulector and saved with the two words and the photo. Once you get to the cheese shop, you have the correct pronunciation and a descriptive photo readily available. Not only do you get the cheese, but you can practice pronunciation and hearing comprehension with this handy little application afterwards in your hotel room, while eating your gazta.
This example relies heavily on the ability to load and save data. Words, photos and sounds are saved to an application-specific directory at E:\Data\Vocabulector. Besides loading and saving files, this example also uses many concepts from Chapter 5, most notably the camera and sounds.
The code is divided into three parts. Example 51 deals with adding new entries to Vocabulector and loading any ...
Get Mobile Python: Rapid Prototyping of Applications on the Mobile Platform now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.