Wednesday, January 15, 2025

Enhance Your Excel Glossaries with a Dynamic Search Bar

Even though there are several tools on the market that allow interpreters to store and retrieve terminology quickly and safely, many of us still rely on Excel to create and share glossaries with our colleagues. And many of us still use a simple search via Ctrl + F to find our terms.

This is not only inefficient, as it doesn't display all the relevant terms grouped together, but rather jumps from hit to hit, making it impractical for the real-time searches required by interpreters. To achieve this, filtering is the best solution. However, setting up and using a filter while interpreting is not ideal either. A dynamic search box, on the other hand, would mimic the behavior we get from dedicated terminology management tools. 

A dynamic search box enhances glossary usability


The purpose of this post is not to explain how to create such a search box (that will be the subject of a separate post, when I can find a bit more time), but rather to share a ready-to-use Excel glossary file where I have added a dynamic search box. This file can be used as a template to create your own glossaries with dynamic search capabilities.

To use it, follow the steps below.

1. Download the Excel file, save it and open it. You may need to click Enable editing if you see a message appear at the top of the file. It may also be a good idea to use "Save As" and make a copy of the file.

2. Replace the sample terms in the Glossary tab with your own terms. You can type or paste your terms. 



3. To use the glossary, go to the Search tab and start typing your desired term in the Search box (indicated by the magnifying glass). You will see all the terms that match the search string immediately listed under the search box.



The file is set up for English and Spanish. If you'd like to change the language labels, you will need to:

1. Edit the column titles in the Glossary and Search tabs.

2. In the Search tab, click cell A5 and look at the formula bar. You will see the formula that makes all the magic happen. Replace "English" and "Spanish" with the appropriate language names. Make sure they match exactly the names that you gave to your columns in the previous step. Be very careful not to change anything else.



If you'd like to see all of this in action, here's a short video.



And that's it. Time to convert your Excel terminology files into enhanced dynamic glossaries!


Monday, January 13, 2025

Regex for Translators: Filtering Segments Starting with a Spanish Infinitive in Trados Studio

 

When working with CAT tools like Trados Studio, regex (regular expressions) can be a powerful ally. It allows you to identify specific patterns in text, saving time and effort. 

Today, let’s look at a simple but effective regex pattern designed to filter segments that start with a Spanish verb in the infinitive form. A specific use case would be a review job where there are inconsistencies, with some segments translated using the infinitive and others using the imperative form of the verb at the beginning of a segment. If we decide to change all the infinitives to imperatives, then it comes in handy to be able to filter and see only the segments that fit this criterion.

The Regex Pattern

Here is the regex pattern:

^\b(?:[a-záéíóúüñ]+ar|[a-záéíóúüñ]+er|[a-záéíóúüñ]+ir)\b

Let’s break it down:

  • ^: Ensures the pattern matches from the beginning of the segment.
  • \b: Marks a word boundary to capture entire words.
  • (?: ... ): Groups the options for non-capturing purposes, which means the parentheses won’t create a separate match group.
  • [a-záéíóúüñ]+: Matches the root of the verb, allowing for lowercase letters and accented vowels commonly found in Spanish.
  • ar|er|ir: Specifies the endings for verbs in the infinitive form.
  • \b: Ensures the word ends here.

What Does This Regex Do?

This regex identifies segments that start with verbs in the infinitive form. For example, it will match segments like:

  • "Vincular la información."
  • "Escribir un informe detallado."
  • "Responder de manera oportuna."

However, it will ignore other types of segments, such as:

  • "Vincule la información."
  • "Escriba un informe detallado."
  • "Responda de manera oportuna."

    Trados Studio file, no filtering




    Trados Studio file, regex-based filtering

    A word of warning: The regex doesn't actually match "infinitive verbs", but actually words that end in -ar, -er, or -ir, which is the structure of infinitive verbs in Spanish. This means that the regex will also match other words with the same structure that are not verbs, such as ayer, tapir, or hogar

Why Is This Useful for Translators?

As translators, we often need to apply specific rules or filters to certain types of text. In the case of Spanish, infinitives are frequently used for:

  • Instructional text (e.g., in manuals or guides): "Llenar el formulario."
  • Headings or titles: "Comprar boletos."
  • General-purpose commands: "Configurar el dispositivo."

However, some clients may prefer the imperative form, and we may find ourselves in a situation where we need to identify segments where an edit is needed.

By using this regex in Trados Studio, or any other CAT tool that supports regex, you can quickly locate and isolate these segments for editing, consistent formatting, terminology application, or quality assurance checks.

How to Use the Regex in Trados Studio

  1. Open your document in Trados Studio.
  2. Go to the "Review" tab.
  3. Paste the regex into the filter field*, making sure you have Source or Target selected, as appropriate.
  4. Apply the filter, and the tool will display only the segments starting with an infinitive.
This approach is not only efficient but also ensures consistency in handling these segments throughout your translation project.

*The regular filter in Trados Studio uses regex by default. To use regex in the Advanced Display Filter, make sure to check the "Use regex" checkbox.


Leveraging GenAI for Regex

Does writing a regex look too complicated? No need to worry. With GenAI, getting a regex like the one above is as simple as going to ChatGPT (or your chatbot of choice) and saying "Give me a regex that will find segments that begin with a Spanish verb in the infinitive form".

While learning regex continues to be a valuable skill for a translator, being able to describe the pattern you need to match can be just as useful when using a GenAI tool.

ChatGPT can help you write regexes


Learn More

Regex can seem intimidating at first, but with a few practical examples, it quickly becomes an indispensable tool. To dive deeper into how regex can enhance your work as a translator, check out The Translator's Tool Box book. It offers clear explanations, examples, and step-by-step instructions tailored to translators.