How to count translation units?
Thread poster: Harklas
Harklas
Local time: 22:53
Jun 24, 2010

How do I count the TU:s in the updated memory?

Direct link Reply with quote
 

Didier Briel  Identity Verified
France
Local time: 22:53
Member (2007)
English to French
+ ...
Do you mean, to know how many TUs were translated? Jun 24, 2010

Harklas wrote:

How do I count the TU:s in the updated memory?


I'm not sure about your question.

If that's about the total number of TUs, and the number of translated ones, you have the figures at the bottom right of the window.

You can also use Tools/Statistics for more detailed information.

Didier


Direct link Reply with quote
 
Harklas
Local time: 22:53
TOPIC STARTER
How much did the tmx grow? Jun 24, 2010

I got a .tmx file from the client, which I have used in the translation and updated with my new sentences.

They want this updated .tmx file back, and they want to know how many translation units is now in that file, so that they can check how much it grew while it was here.

The numbers in the lower-right corner, and the number in the statistics file seem to refer to this project only. I need a TU count on the whole .tmx file, including what was in there before my project.


Direct link Reply with quote
 

Didier Briel  Identity Verified
France
Local time: 22:53
Member (2007)
English to French
+ ...
You need a TMX editor, or a workaround Jun 24, 2010

Harklas wrote:

I got a .tmx file from the client, which I have used in the translation and updated with my new sentences.

Did you rename that TMX to project_save.tmx, and then use that as the basis of your project?

If yes, the number of TUs is the original number plus the number of TUs of the project.

The numbers in the lower-right corner, and the number in the statistics file seem to refer to this project only.

That's correct.

I need a TU count on the whole .tmx file, including what was in there before my project.

Under Windows, Olifan would give you the answer easily, but there isn't yet a Linux version.

There is a workaround if you have than 1000 TUs.

Put the TMX (as project_save.tmx in the /omegat directory) in a project with only one line (from a text file) in the /source directory (if you don't put at least one word in /source, you will not be able to open the project).

Now, search (Ctrl+F) an empty string. This will give you the number of TUs (just subtract one for the one in /source).

Didier


Direct link Reply with quote
 
Harklas
Local time: 22:53
TOPIC STARTER
Wonderful! Jun 24, 2010

I have Olifant for Windows installed, and now I understand why I have it

Project 100% completed! I'd pop a beer right now if it wasn't for the other projects waiting, but tonight I'll toast for you guys, friendly random people on the Internet.

Cheers


Direct link Reply with quote
 

Samuel Murray  Identity Verified
Netherlands
Local time: 22:53
Member (2006)
English to Afrikaans
+ ...
@Harklas Jun 24, 2010

Harklas wrote:
I got a .tmx file from the client, which I have used in the translation and updated with my new sentences. They want this updated .tmx file back...


To get a count, you'll have to find a way to count the TUs (segments, sentences) in the TMX file. An easy way to do that is to open the TMX file in a text editor and count the number of times the sequence "" occurs in it. Added: I assumed you didn't have Olifant.

You'll also have to merge your project's omegat.tmx output TM with the client's TM. Then you can count the TUs in the merged TM, and subtract the original TM's number of TUs from it. You just have to make sure that the merge process removes duplicate TUs, and you have to make sure that when you count the client's original TM's TUs, that you have already removed the duplicates.

So, do this:

1. Let's say your project is called Project1 and you've translated the files. You now have a file called Project1-omegat.tmx.
2. Create a new project called Project2. Put your source files in its /source/ folder as if you're going to translate it.
3. Close OmegaT and then replace /omegat/project_save.tmx with your client's TM (rename it).
4. Open OmegaT, open the project, and then close OmegaT again (this will cause OmegaT to read the project_save.tmx and remove any duplicates from it that it finds).
5. Count the number of TUs in project_save.tmx.
6. Create a subfolder in /tm/ called /auto/ and put Project1-omegat.tmx in it.
7. Open OmegaT, open the project, and then close OmegaT again (this will cause OmegaT to add the TUs from the /auto/ folder to the project_save.tmx, and remove any duplicates from it that it finds).
8. Count the number of TUs in project_save.tmx again.

Now subtract #5's count from #8's count. Rename project_save.tmx to the client's TM's original name, and send him the TM.

Didier can say if this method (which I haven't tested) has holes in it.


[Edited at 2010-06-24 14:15 GMT]


Direct link Reply with quote
 

Didier Briel  Identity Verified
France
Local time: 22:53
Member (2007)
English to French
+ ...
A bit convoluted, but it should work Jun 24, 2010

Samuel Murray wrote:

1. Let's say your project is called Project1 and you've translated the files. You now have a file called Project1-omegat.tmx.
[snip]
8. Count the number of TUs in project_save.tmx again.

Now subtract #5's count from #8's count. Rename project_save.tmx to the client's TM's original name, and send him the TM.


Normally, it should work.


Direct link Reply with quote
 


There is no moderator assigned specifically to this forum.
To report site rules violations or get help, please contact site staff »


How to count translation units?

Advanced search






PerfectIt consistency checker
Faster Checking, Greater Accuracy

PerfectIt helps deliver error-free documents. It improves consistency, ensures quality and helps to enforce style guides. It’s a powerful tool for pro users, and comes with the assurance of a 30-day money back guarantee.

More info »
BaccS – Business Accounting Software
Modern desktop project management for freelance translators

BaccS makes it easy for translators to manage their projects, schedule tasks, create invoices, and view highly customizable reports. User-friendly, ProZ.com integration, community-driven development – a few reasons BaccS is trusted by translators!

More info »



Forums
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search