Chapter 15. Searches
Prev |  | Next

## Chapter 15. Searches

## 1. Search window

Figure 15.1. Text search Window

### Note

The above search finds all target segments that contain characters, rather improbable in the target - i.e. Slovenian - language.

### 1.1. Searching

OmegaT provides a powerful range of search functions. Open the Search window with Ctrl+F and enter the word or phrase you wish to search for in the Search for box. Alternatively, in the Editor window, select a word or phrase in the editing field (target text of the current segment) and hit Ctrl+F. The word or phrase is entered in the Search for box automatically. You can have several Search windows open at the same time, but close them when they are no longer needed so that they do not clutter your desktop.

### 1.2. Search location

Searches are performed by default in both the source and target sections of the project, but you can limit your search to just the source or the target text. You may search in

- the project only (default setting)

- both the project and the reference translation memories in /tm/ (check Search TMs)

- a single file or a folder containing a set of files (check Search files)

When searching through files (as opposed to translation memories), OmegaT restricts the search to files in source file formats. Consequently, although OmegaT is quite able to handle`tmx` files, it does not include them in the Search files search. If you turn on Advanced Options, you can combine the search with the name of the author of the translation and time of the last change made.

## 2. Using wild cards

In both exact and keyword searches, the wild card search characters '*' and '?' can be used. They have the meaning, familiar to Word users:

- '*' matches zero or more characters, from the current position in a given word to its end. The search term`'run*'` for example would match words `'run'`, `'runs'` and `'running'`.

- '?' matches any single character. For instance, `'run?'` would match the word `'runs'` and `'runn'` in the word `'running'.`

The matches will be displayed in bold blue. Note that '*' and '?' have special meaning in regular expressions, so wild card search, as described here, applies to exact and keyword search only (see below).

## 3. Search methods and options

Select the method using the radio buttons. You can choose between two methods to search:

exact search

  Search for segments containing the exact string you specified. An exact search looks for a phrase, i.e. if several words are entered, they are found only if they occur in exactly that sequence. Searching for `open file` will thus find all occurrences of the string `open file`, but not `file opened` or `open input file`.

keyword search

  Search for segments containing all keywords you specified, in any order. Select keyword search to search for any number of individual full words, in any order. OmegaT displays a list of all segments containing all of the words specified. Keyword searches are similar to a search "with all of the words" in an Internet search engine such as Google (AND logic). Using keyword search with `open file` will thus find all occurrences of the string `open file`, as well as `file opened`, `open input file`, `file may not be safe to open`, etc.

regular expressions

  The search string will be treated as a regular expression. The search string - [a-zA-Z]+[öäüqwß] - in the example above for instance looks for words in the target segment, containing questionable characters from German keyboard. Regular expressions are a powerful way to look for instances of a string. See more in the chapter Regular Expressions.

Additionally to one of the methods above you can select the following:

- case sensitive: the search will be performed for the exact string specified; i.e. capitalization is observed.

- in source: search in the source segments

- in translations: search in the target segments

- in notes: search in notes to segments

- search TMs: translation memories in the `tm` folder are included in the search.

- display all results: clearing this check box will case OmegaT show just the first occurrence of a hit, if several hits exist

If you click on the button Advanced options additional criteria (author of the translation, date translated etc) as shown in the above image can be selected.

## 4. Search results display

Pressing the search button after entering a string in the search field displays all the segments in the project that include the entered string. As OmegaT handles identical segments as one single entity, only the first unique segment is shown. The segments are displayed in order of appearance in the project. Translated segments are displayed with the original text at the top and the translated text at the bottom, untranslated segments are displayed as the source only.

Clicking on a segment opens it in the Editor for modifications. You can then switch back to the Search window for the next segment found, for instance to check and, if necessary, correct the terminology.

You may have several Search windows open at the same time. You can quickly see their contents by looking at their title: it will contain the search term used.

Prev |  | Next
Chapter 14. Source segmentation | Home | Chapter 16. Regular expressions