Making variables work for you

01It’s funny, but when I think of “variables” I think of something that changes… a bit like the Transformer robots my son used to play with.  So when I look at how they are used in Studio, and in Trados before that, the name doesn’t really make sense at first!

In practice, “variables” in Studio are words or phrases that don’t change at all when you translate them.  So it’s useful to be able to ensure they are handled automatically in Studio by defining lists containing these “variables”.

I wrote about them a while ago in this article “Working with Variable Lists” that explained how to get long lists of ”variables” into Studio using a workaround because Studio only allows you to add them in one at a time.  If you are a fortunate GroupShare user you don’t have this problem as you can import long lists, and some users I know have tens of thousands, out of the box.  But what I neglected to do was explain why you might want ”variables” in the first place!

So, I thought I’d write about them again, only this time explain why they are useful, and then show you a couple of interesting ways to make the most of the resources you already have and possibly weren’t aware.

Why are they called variables?

So first let’s think about that name again.  The reason they are called “variables” is because the different words or phrases you might have in your “variable” list don’t change, but the words around them might.  So these words or phrases are interchangeable.  For example, I might have these sentences:

Eric Idle was a member of the English surreal comedy group Monty Python.

John Cleese was a member of the English surreal comedy group Monty Python.

Michael Palin was a member of the English surreal comedy group Monty Python.

Terry Gilliam was a member of the English surreal comedy group Monty Python.

Terry Jones was a member of the English surreal comedy group Monty Python.

In these examples, Eric Idle, John Cleese, Michael Palin, Terry Gilliam and Terry Jones are all what we refer to as “Variables”.  So the rest of the sentence in every case is exactly the same.  Now the reason this is a powerful concept is because if you translate the first sentence without any concept of “Variables” then this is what happens:

02

I confirm segment #1 and segments #2, #3 and #4 are autopropagated for me with a 90% match.  So there is no recognition of the fact that the only change is the names, and this is because the software has no idea that you wouldn’t translate these names and it calculates a fuzzy match accordingly and shows me the differences in the Translation Memory results window to help me.

However, if I add these names… one at a time… to the variable list for my Translation Memory then I can see a very different effect:

04

I now don’t have to handle these “variables” as they are automatically replaced and I get 100% matches for all of the segments that contain the same text apart from the “variable” text.  You can also see, in the active segment #5, that the “variable” is being recognised by the blue line that underlines in the source.

This is the benefit of using “variables” and I know companies who manage lists of thousands of these for postal codes, product codes, brand names, peoples names etc.  Anything that won’t change during the translation.

Now that we know this we can look at how you get them into the “variables” list in your Translation Memory without having to add them one at a time, nor by using the workaround I wrote about in my previous post.  And I’d also like to take a look at how you might be able to extract potential “variable” candidates from the Translation Memories you’ve been building up for years.  These will contain many “variables” that you’ve handled manually in the past.

The “out of the box” way to get your variables into your Translation Memory, or Language Resource Templates are to add them one at a time through here:

03

Variables Manager for SDL Trados Studio

With the release of Studio 2014 there is a new application on the OpenExchange called Variables Manager.  You can download it for free from here: Variables Manager for SDL Trados Studio (Note: if you can’t figure out how to install it then try adding a .zip to the end of the filename and unzip it.  You’ll find an exe and an instructional pdf inside.)

This application is a simple one screen interface that looks like this:

05

The functions are really easy to use and you can apply these to a Studio Translation Memory (*.sdltm) or a Studio Language Resource Template (*.sdltm.resource).

Clear Variables list : This simply clears the list visible in the variables pane on the top right.  It does not delete them from your TM or Language Resource Template.

Import from file : This allows you to select a text file containing a list of variables and import them so they are visible in the variables pane.

Export to file : This will export an existing variables list from your TM or Language Resource Template to a text file.

Fetch variables list : This will fetch an existing list of variables from your TM or Language Resource Template and display them in the variables pane on the top right.

Add to variables list : If you click this it will add whatever variables are shown in the variables pane to your existing variables list.  So if you fetch a variables list and then click Add to variables list this will duplicate the list you have already.  So best used to just add new variables.

Replace variables list : This will replace your existing variables list with whatever variables are shown in the variables pane.

So really a very simple and intuitive tool for performing a function that is very time consuming and impractical in Studio when you try and edit the list through the Language Resource Settings.

SDLTmFindVars

Now, if you haven’t used variables before, I hope this article has been explanatory enough to show you how useful they can be, and also how to implement them easily.  But I wanted to share one more interesting piece of news about a new OpenExchange application you can expect to see on the SDL OpenExchange (now RWS AppStore) very soon.  It’s called SDL TmFindVars and is the fifth tool developed by Costas Nadalis.  Costas brought you the incredibly useful SDL TmConvert that I wrote about here – “Memory is the mother of all wisdom” as well as tools for converting and reversing TMs.

*** NOW ON THE OPENEXCHANGE***

Click here for SDL TmFindVars

*******************************************

This new tool provides the ability to extract variable candidates from your Translation Memory by examining what you’ve translated in the past and preparing a list of potential variables.  It looks like this:

06

There are some simple options to help make the list more relevant and smaller in size, but you could extract a list of all candidates and manually sort them using Microsoft Excel as the CSV output very helpfully provides lots of additional information to help you decide, showing you where the variable came from in the source and target text, which occurrence it is (so 2nd, 3rd, 45th etc…).  So for my TM that contained around 42,000 Translation Units I get this:

  1. A CSV file containing 18,277 extracted candidates.  This includes every candidate whether repeated or not.  So they are not unique.
  2. A text file containing 1,750 unique extracted candidates which are based on the settings I chose to use.

The text file is actually pretty good, but I can refine this further in an editor before finally using the Variables Manager to quickly import them all in a few seconds so I can benefit from them in Studio whilst translating.  Pretty neat!

I’ll update this article as soon as this application becomes available, but I expect it to be pretty soon!

*** NOW ON THE OPENEXCHANGE***

Click here for SDL TmFindVars

*******************************************

23 thoughts on “Making variables work for you

  1. I downloaded the Variables Manager, but cannot get it installed as I don’t know what the file name extension is. When I download the installation file it has no file name extension. I tried EXE and MSI but they didn’t work. Or I a missing something obvious?

    Thanks for any help.

    Robert

  2. And 2 minutes later I solved the problem myself. The downloads are ZIP files. So adding .zip helps – it’s easy when you know how.

    Robert

  3. The SDLTmFindVars looks really promising. Actually, I think a lot of people could use it also as a terminology extraction tool! That’s definitely what I would try first thing.

    1. The idea occurred to me as well. But I’m not sure how immediately useful it will be given it’s monolingual. But I can see it would be handy for creating the list to then translate and convert to a termbase later.

  4. If I get this right, variables in this context = non-translatable terms? If so, then one could tag them as non-translatable or internal style while preparing the text.
    I guess extracting them from a TM should be pretty straightforward to, just check what terms are the same in source/target segment, define minimum length, exclude numbers…

    1. I guess you could do, but then you wouldn’t get the benefit I explained with regard to matching… and you’d have to do this for every file, every time… and not all filetypes will make it easy.

      1. Yes, indeed. To diverge a little, what I would like to see in Studio is a way to automatically replace target terms. I.e. I can remember in olden times this could (only) be done as a pretranslation option. Many other TEnTs offer this functionality already on a segment and/or pretranslation level.

  5. Is it possible to use a regular expression as a variable? For instance to treat all possible proper nouns in a source document as variables?

  6. Paul, I do have specific problem with the variables. When I turn on the check-box in the TM settings I get really bad results. Studio recognizes all capital words as an variable. So I have a file with 30 different words but studio actual counts then as one no match word and 29 repetitions :(. the strange thing is that I have seen this behavior only since we have GroupShare and the TMs are on the server.

  7. Hi Paul,

    I was at a loss about how to use the Variables Manager app (despite its self-explanatory interface) and then I found this great how-to article here. Thank you once again for your very useful information!

  8. Hi Paul, I am just getting to know the variables concept, so please bear with my elementary level questions. Here is one that just came up.
    When I use multiple TMs for a project, is there a way to select these translation memories to share the same variable list? It seems I can only choose one translation memory to add in the first field at a time in the Variables Manager window.
    Thank you in advance for your information.

    Chun-yi

    1. Hi Chun-yi, the variables list is held on the language resources and these are held on the Translation Memory. So you can’t have one set to be shared amongst all memories.

  9. Hi Paul,

    I have a file that contains phone numbers in format like 1-234-123-4567. Is there a way to set up the TMfindVars app so that it extracts the entire number as one variable? If not, then I guess this would require manual adding to the variables list in Variables Manager, right?

    Chun-yi

    1. You could do that, but it would be a little specific and unreliable for any slight differences in numbers. Better solution here is to use the Terminjector as you could just set one pattern and it would catch all telephone numbers in that format.

      1. I tried to learn Terminjector a few months ago but it was too hard for me to learn. As you know, Autosuggest does not work well with my character-based target language. Would Terminjector also have this problem?

        1. I don’t know to be honest. Can you use regex to search and replace successfully? If you can then I guess terminjector would work too… send me an example problem if you like and I’ll have a go at it in your language pair.

  10. Hi Paul, I have only used regex to search in source segments, not in target. I will have to learn more about regex and terminjector to be able to send you an example problem:)

  11. Hi Paul,

    The Variables Manager app is useful, but would be even more useful if any variables added via the app were immediately available in your session. The only way I can get them to work is to restart Studio. This is fine if I add a bunch of variables in bulk before starting the project, but a bit crap when adding stuff on the fly. Is there any way to force Studio to reload/refresh a TM I add them to?

    Michael

Leave a Reply