Skip to content
Tutorials Center
My learning

Topics

Lesson 47 of 51 · Projects and Practice

Project: build your personal Spanish phrasebook

Build a personal Spanish phrasebook with categories, search and listening, then analyze a text with Python to find the most common words and accented words.

A phrasebook is a small collection of sentences you actually need. Commercial phrasebooks are written for tourists in general; yours is written for you: the places you will go, the people you will meet and the things you want to say. Building one has two benefits. First, writing and organizing phrases helps you remember them. Second, the finished tool becomes a quick reference on your phone or computer. In this project you will use a small web page and a Python script to collect and analyze your phrases.

Three cards: collect phrases, organize them by situation, and search and practice them.
The phrasebook cycle: collect, organize, practice.

What you will build

  • A searchable phrasebook that filters by category and by any word (in Spanish or English) and can read phrases aloud, if your browser supports speech.
  • A word frequency analyzer in Python that shows which words and accents appear most often in a Spanish text of your choice.
  • A personal plan for adding five new phrases per week.

Key ideas

Chunk: a ready-made group of words learned as a unit (¿Me puede ayudar?). Category: a situation label such as Travel or Food. Frequency: how often a word appears; frequent words are most useful to learn. Corpus: a collection of texts used for analysis. Spaced repetition: reviewing items at growing intervals.

Step 1: collect

Start with a notebook or a note on your phone. Whenever something happens in your day that you could not say in Spanish, write down the English sentence and later look up or compose the Spanish. Also copy phrases you hear or read: ¿Qué tal?, No te preocupes, Lo siento mucho. Good phrases are short, useful and complete: a whole sentence you can say as is is worth more than an isolated word. Aim for around 15 phrases to begin with; the example below contains 16 in four categories.

Group phrases by situation rather than by grammar: greetings, travel, food, help. Situation labels let you find what you need in a hurry. The page below stores the phrases as a list in JavaScript, shows them by category and filters them as you type. Try searching for tren, then please, then a category. Edit the list to add your own phrases and run it again.

Phrasebook with search

How it works: the PHRASES list holds three values per phrase (category, Spanish, English). The page builds the category buttons from the list, so a new category appears automatically. The search box checks whether the typed text appears in the Spanish or English text. The Listen button uses the browser's speech synthesis when it is available; if it is not, the button shows n/a. Never rely on it as the only way to learn pronunciation: listen to native speakers whenever you can.

Step 3: analyze a text

Which words should you learn first? The most frequent ones, because you will see them most often. A frequency analysis counts how many times each word appears in a text. The script below does it for a short paragraph. Replace the paragraph with a text of your own (a message from a friend, a news paragraph, a song) to see which words repeat.

Python Word frequency analyzer

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Python reads the text, makes it lowercase, extracts words with a regular expression that accepts accented letters and ñ, and counts them with Counter. In a longer Spanish text, little words such as de, la, que, el, en and y dominate. Learning the top words of a language gives you a disproportionate part of everyday reading.

Step 4: review with a schedule

A phrasebook only works if you come back to it. Review new phrases the next day, then after three days, a week, two weeks and a month; this schedule is called spaced repetition. Each time you remember a phrase, the interval grows; each time you forget, you start again. Use the Listen button and say each phrase aloud before you read the English.

Writing good phrases

A phrase becomes useful when you can recall it in a real situation. Some guidelines: write phrases in the form you would say them, with the right pronoun (usted for officials, tú for friends); include a polite word (por favor, perdone, disculpe); avoid very long sentences; and add a note about where to use it. Here is a mini plan for the first month: in week 1 collect ten greetings and survival phrases (No entiendo, ¿Puede repetir?), in week 2 add ten food and shopping phrases, in week 3 ten travel phrases and in week 4 ten phrases about yourself (Soy..., Trabajo en..., Me gusta...). At the end of the month you will have forty phrases that you know well, which is more valuable than four hundred you only half remember.

Two bonus habits help a lot. First, say each phrase out loud with its gesture and tone; language is also body and voice. Second, change one word in every phrase: Quisiera una mesa para dos becomes Quisiera una mesa para cuatro / en la terraza / junto a la ventana. Variation turns a memorized sentence into a flexible pattern.

Extension ideas

  1. Add a Review mode that hides the Spanish and asks you to type it.
  2. Store the phrases in a text file and load them with a script, so they are separate from the page code.
  3. Add a "learned" checkbox and show only phrases you have not mastered.
  4. Create separate phrasebooks for a trip, a job or a hobby.
  5. Sort the phrases by length and learn the shortest first.

Common misconceptions

  • "A phrasebook can replace grammar study." It is a tool for communication; grammar helps you build new sentences.
  • "Word-for-word translation always works." Many phrases are idioms: tener hambre is "to have hunger", not "to be hungry".
  • "Machine voices are perfect." Speech synthesis may stress words wrongly; compare with real speakers.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. What makes a phrase good for a phrasebook?

    Short, complete, useful phrases are the most reusable.
  2. 2. What does a word frequency analysis show?

    It counts the occurrences of each word.
  3. 3. What is spaced repetition?

    Intervals grow each time you remember the item.
  4. 4. Why group phrases by situation?

    Situation categories make lookup fast and natural.

Summary

  • A personal phrasebook focuses on the situations you meet.
  • Collect short, complete phrases; sort them by situation; search and review them often.
  • A frequency count shows which words are most worth learning.
  • Spaced repetition keeps phrases in memory.
  • Extend the tool with review mode, a learned flag and separate phrasebooks.

Next: Practice set