Quickly create a TMX
Thread poster: Hans Lenting
Hans Lenting
Hans Lenting
Netherlands
Member (2006)
German to Dutch
Oct 16, 2022

Sometimes I'm in the middle of a project and need to research a term. When I find this term in a document for which a translation is available, I decide to create a TMX (since my CAT tool, CafeTran Espresso, can open it without conversion).

But it has to be quick, since I'm concentrating on the text to be translated.

Today I had to research a term from the ATEX and found
... See more
Sometimes I'm in the middle of a project and need to research a term. When I find this term in a document for which a translation is available, I decide to create a TMX (since my CAT tool, CafeTran Espresso, can open it without conversion).

But it has to be quick, since I'm concentrating on the text to be translated.

Today I had to research a term from the ATEX and found this EU Directive. Of course, the Dutch translation is available too.

So I quickly copied the Definitions from Chapter 1 (DE and NL).

Remember, the creation of the TMX has to be fast.

I see several procedures, and your input and creative thinking is very welcome:

1. Create a bilingual table in Ms Word. Run a macro to save as TMX (like I have described earlier in this forum).

2. Create a bilingual table in Ms Word. Run a macro in AutoHotkey or Keyboard Maestro.

3. Create a bilingual table in Ms Word. Use a TMX template and a TextFactory (BBEdit for Mac) to create the TMX file.

4. Your idea here ...

BTW: Is there any other way (than Ms Word) to quickly align the 26 Definitions of the Directive?
Collapse


 
Hans Lenting
Hans Lenting
Netherlands
Member (2006)
German to Dutch
TOPIC STARTER
Method 3 Oct 16, 2022

The TMX template would look like this:

Screen Shot 2022-10-16 at 12.22.38

The Find and Replace actions on the tab-delimited and aligned segments would be:

For the source segments:

Screen Shot 2022-10-16 at 12.24.13

For the target segments:

Screen Shot 2022-10-16 at 12.24.22


 
Hans Lenting
Hans Lenting
Netherlands
Member (2006)
German to Dutch
TOPIC STARTER
Download Oct 16, 2022

You can download the ATEX segments and TMX template here.

 
Samuel Murray
Samuel Murray  Identity Verified
Netherlands
Local time: 07:02
Member (2006)
English to Afrikaans
+ ...
Aligner Oct 16, 2022

Hans Lenting wrote:
But it has to be quick, since I'm concentrating on the text to be translated.

Is there a reason why you don't use an aligner? The more you use the aligner, the quicker you'll become.

Another idea is to contact the developer of your CAT tool and ask him to create a feature that imports a two-column tabbed text file into the current translation memory.


Milan Condak
 
Milan Condak
Milan Condak  Identity Verified
Local time: 07:02
English to Czech
LF Aligner Oct 16, 2022

Samuel Murray wrote:

Is there a reason why you don't use an aligner? The more you use the aligner, the quicker you'll become.


No manual editing, only set-up of parameters

Edit a file LF aligner Setup.txt you select
Filetype default (t/c/com/epr/w/h/p): [c]
Language 1 default: [de]
Language 2 default: [nl]
Make TMX by default: [y]
Language code 1 default: [DE-DE]
Language code 2 default: [NL-NL]

Create a sub-folder with a name of CELEX: 32014L0034.

LF Aligner shall download two HTML, create two TXT; one aligned TXT and TMX.
If a number of source and target segments are equal we allow to create TMX file.
I created TMX segmented by paragraphs because the number of sentences differed.

Milan


 
Hans Lenting
Hans Lenting
Netherlands
Member (2006)
German to Dutch
TOPIC STARTER
Simpler Oct 16, 2022

Samuel Murray wrote:

Is there a reason why you don't use an aligner? The more you use the aligner, the quicker you'll become.


Because of the extra steps to take and the fact that I'll probably not be able to integrate the aligner in an automated workflow.

I think that it should programmatically be quite simple to align to files by paragraph.

I have two files, source.txt and target.txt, with the same number of paragraphs.

How can I align them so that the result contains:

Source paragraph 1 TAB Target paragraph 1
Source paragraph 2 TAB Target paragraph 3
Source paragraph 3 TAB Target paragraph 3
etc.
The leading numbers in the example files are coincidental.


Let's wait and see.


 
Hans Lenting
Hans Lenting
Netherlands
Member (2006)
German to Dutch
TOPIC STARTER
Line numbers Oct 16, 2022

One approach:

Automatically add line numbers to the source text.
Automatically add line numbers + "a" to the target text.
Merge source and target text.
Sort:


Screen Shot 2022-10-16 at 23.21.28

Replace line number + "a" with a tab character.

etc.

Perhaps this shell command works:

paste -d '\t' source.txt target.txt > aligned.txt



[Edited at 2022-10-17 00:39 GMT]


 
Hans Lenting
Hans Lenting
Netherlands
Member (2006)
German to Dutch
TOPIC STARTER
Solved Oct 17, 2022

Solved the aligning task:

In the Terminal:

Screen Shot 2022-10-17 at 07.46.42

As a Keyboard Maestro macro in the menu bar:

Screen Shot 2022-10-17 at 07.49.30


 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Quickly create a TMX







Trados Business Manager Lite
Create customer quotes and invoices from within Trados Studio

Trados Business Manager Lite helps to simplify and speed up some of the daily tasks, such as invoicing and reporting, associated with running your freelance translation business.

More info »
Trados Studio 2022 Freelance
The leading translation software used by over 270,000 translators.

Designed with your feedback in mind, Trados Studio 2022 delivers an unrivalled, powerful desktop and cloud solution, empowering you to work in the most efficient and cost-effective way.

More info »