OmegaT Scripts: a Script to Merge or Split Segments

OmegaT script gurus Kos Ivantsov, Yu Tang and Dimitry Prihodko created a wonderful script that allows to merge or split a segment. This was the one feature that commercial CAT tools had and OmegaT missed. Until now! Let's see how to install and use this script.

(Print version)

[Leggi questo articolo in italiano]

How to Install the Script

  1. Download the script from the SourceForge page: http://sourceforge.net/projects/omegatscripts/files/aux%20scripts/merge_split.tar.bz2/download. The download starts automatically and, depending on the browser settings, it asks to indicate a local path where to save it. The downloaded file is named: merge_split.tar.bz2.
  2. .bz2 files are just another type of compressed files (like .zip files). Most compression utilities can manage this kind of files, so use a compression utility to open the file. In Windows I suggest to use 7zip.
  3. Inside the compressed archive, you will find the merge_split.tar file. Double click on it inside the compression utility to open it. There you will find a folder containing the merge_split.groovy file and a folder called propertiesCopy the merge_split.groovy file in the script path of your installation of OmegaT. 
  4. Then copy the files contained in the properties folder in the corresponding folder inside in the script path of your OmegaT installation (if the properties folder doesn't exist, just copy and paste it inside the script folder). 
  5. Assign a shortcut to the script
  6. For details on how to install a script see my post on Importing OmegaT scripts.

How to Use the Script

The Merge/Split script creates new segmentation rules and applies them to the project. In order to perform this operation, you must enable the project specific segmentation rules. If project specific rules are not enabled, OmegaT will use the generic segmentation rules and the Merge/Split script will not work.

To enable the project specific segmentation rules:

  1. Select Project > Properties
  2. Press the Segmentation... button. The Project Specific Segmentation Setup window appears.
  3. In this window select the Make the segmentation rules project specific checkbox. Project specific segmentation rules
  4. Press OK on the two windows. OmegaT asks if you want to close and re-open the project.
  5. Press Yes. Now project specific segmentation rules are enabled on your project.
Note: You must enable the project specific segmentation rules for any project in which you want to use the Merge/Split script.
 

To merge two segments:

  1. Open the first of the two segments to merge in the editor.
  2. Press the shortcut combination or select Tools > Merge or split segments (this menu item is shown only if you have assigned a shortcut to the script).  
  3. The script shows a dialog with a preview of the segment produced by the merging operation. 
  4. If you are satisfied with the result, press Yes in the dialog, otherwise press No.
  5. Another dialog informs you that to see the merged segment you need to refresh the project. If you want to refresh it immediately, press Yes, otherwise press No
    Note: if you press No in this dialog the segmentation rule is created anyway, but you will see the results of the applied rule (i.e. the merged segment) only after the next refresh of the project or when you close and re-open it.
 

To split two segments: 

  1. Open the segment you want to split.
  2. Using the mouse click on the exact point where you want to split the segment and select all the text until the end of the segment (i.e. you must select all the text that will become the second segment). 
  3. Press the shortcut combination or select Tools > Merge or split segments (this menu item is shown only if you have assigned a shortcut to the script). 
  4. The script shows a dialog with a preview of the segment produced by the splitting operation. 
  5. If you are satisfied with the result, press Yes in the dialog, otherwise press No.
  6. Another dialog informs you that to see the splitted segments you need to refresh the project. If you want to refresh it immediately, press Yes, otherwise press No
    Note: if you press No in this dialog the segmentation rule is created anyway, but you will see the results of the applied rule (i.e. the merged segment) only after the next refresh of the project or when you close and re-open it.
dasmi Monday 25 January 2016 - 06:00 am | | Translator tools

One comment

One or more comments are waiting for approval by an editor.

(optional field)
(optional field)

Comment moderation is enabled on this site. This means that your comment will not be visible until it has been approved by an editor.

Remember personal info?
Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.