![]() Let’s see how these regular expressions work. ![]() pre ?amplifier: Finds instances of “pre amplifier,” “pre-amplifier,” and “preamplifier.” (See Figure 1.).gr (a|e)y or gr y: Finds the word “gray” spelled both with an “a” (“gray”) and with an “e” (“grey”).(Please note that the regular expressions appear in red in the examples.) Ways to Use Regular Expressionsįinding Different Forms of the Same Term: Here is how you can use a regular expression to ensure that the terms “gray” and “preamplifier” are spelled consistently in your translation: For example, to find all instances of words that contain “able,” you would use the regular expression comprising the search string “ able,” which would not only find the word “ able,” but also “ en able,” “ able-bodied,” and “ agree able.” But if this was all that regular expressions could do, they wouldn’t be interesting, or particularly useful, or challenging to learn.Īs we’ll see from the examples that follow, what makes regular expressions powerful are the various symbols and characters you can use with them. The simplest regular expressions use no symbols, just normal characters. 1 Regular expressions are used by search engines, text editors, text processing utilities, and for lexical analysis. This pattern is then used to search for (or replace) specific instances of words or phrases in a text. CAT tools also use regular expressions for creating segmentation and auto-translation rules, or for protecting tags.įigure 1: Using a Single Regular Expression to Find Different Forms of the Same Term What Are Regular Expressions and How Can They Help Translators?Ī regular expression is a special sequence of characters or symbols that define a search pattern. The following will focus on using regular expressions for searching, replacing, and filtering text in CAT tools such as SDL Trados Studio, memoQ, or Xbench. In short, have you ever wondered how much easier it would be if you could do something beyond what the normal search-and-replace function can do? If yes, then regular expressions may help you.Īt first, regular expressions may appear cryptic, but once you’ve learned the basics and seen how useful they can be, you’ll be able to decide how much time you want to invest to become more proficient at using them. Filter text in your CAT tool to display only the segments that contain certain words in the source, or the segments that don’t contain a specific word in the target?.Filter text in your CAT tool to find the segments where the end punctuation differs between the source and target?.Search a glossary for all capitalized headwords and change them to lowercase while leaving acronyms and other terms that are in all uppercase unchanged-and do all this in a single operation?.Filter text in your CAT tool to display only those segments that are capitalized differently between the source and target?.Perform two or more separate searches at the same time (e.g., searching for different forms of the same term, or perhaps for different words altogether)?.Have you ever wondered how much easier it would be if you could: Regular expressions can assist our translation work by allowing us to search, replace, and filter text in ways that would otherwise be impossible in our software tools. You can think of regular expressions as a search-and-replace function on steroids. Regular expressions (also known as RegEx) are a very powerful resource and open a full range of possibilities in different programs, including some computer-assisted translation (CAT) tools.
0 Comments
Leave a Reply. |