SDL Trados Studio
SDL Trados GroupShare
SDL Trados Business Manager
SDL Trados Live
SDL Speech to Text
SDL Managed Translation - Enterprise
Translation Management Connectors
SDL LiveContent S1000D
SDL Contenta S1000D
SDL Tridion Docs
SDL Tridion Sites
SDL Content Assistant
SDL Machine Translation Cloud
SDL Machine Translation Connectors
SDL Machine Translation Edge
Tridion Docs Developers
SDL User Experience
Language Products - GCS Internal Community
SDL Community Internal Group
SDL Access Customer Portal
SDL Professional Services
SDL Training & Certification
Language Technology Partner Group
SDL Academic Partners
SDL Approved Trainers
SDL Enterprise Technology Partners
ETUG (European Trados User Group) Public Information
Machine Translation User Group
Nordic SDL Tridion Docs User Group
SDL Tridion UK Meetup
SDL Tridion User Group New England
SDL Tridion West Coast User Group
SDL WorldServer User Group
Tridion Docs Europe & APAC User Group
Tridion User Group Benelux
Tridion User Group Ohio Valley
SDL MultiTerm Ideas
SDL Passolo Ideas
SDL Trados GroupShare Ideas
SDL Trados Studio Ideas
SDL Machine Translation Cloud Ideas
SDL Machine Translation Edge Ideas
SDL Language Cloud TMS Ideas
SDL Language Cloud Terminology Ideas
SDL Language Cloud Online Editor Ideas
SDL Managed Translation - Enterprise Ideas
SDL TMS Ideas
SDL WorldServer Ideas
SDL Tridion Docs Ideas
SDL Tridion Sites Ideas
SDL LiveContent S1000D Ideas
SDL Contenta S1000D
SDL XPP Ideas
Events & Webinars
To SDL Documentation
To SDL Support
What's New in SDL
Detecting language please wait for.......
Firstly, in a nutshell, it works like this;
above diagram has only two elements but, mine can have Max. "9" of them (TMs)
Now, let me show you an example.
You have "2" TMs-TM1 has TU ID 1050, 1051 and 1052 -TM2 has TU ID 305, 306 and 307
As you can see, they have the same TUs within it.-TM1, 1051-TM2, 305
This code deletes above two common TUs only, so makes all TUs Unique
make Unique items.zip
the first code makes a "Survival List" with MS Excel the 2nd code deletes "common TUs" using the above MS Excel file.
Misc.-currently, the SurvivalList is odered by TM name and LastUsedDate, I believe you are very good at MS Excel,, right ?-if you want to remove more TUs, just delete/remove/emptify Any one or All cell(s)/row(s) from the Survival List, too easy.-the term "common" has a little bit wider meaning here (it considers "Characters" only)-and the common parts are gone, all of them, perfectly. So, you have to make a way to keep existence of common parts.-usually, I prefer to "ClickOnceBlindly" style but, all these selections/considerations/controls/options.. looks not bad, unless too much.
This behaves a little strange. I ran a few tests to see how this worked. Worth noting the following if anyone else wants to try this:
I also have a question over which TU does it retain?
I compared two TMs with approx 50k TUs in each. I deleted 50 TUs from one. I expected the result to show an Excel file with 50 TUs in it.
I compares two TMs, one with only four TUs and another with one that matched one in the first one as I wanted to see what a duplicate was? Same source only, same target only, same source and same target?
I repeated Test 1 and this time it took even longer and then produced an Excel file with all 50k TUs in it. The 42 that were not duplicates were actually appended after a red line at the end of the 50k duplicates. So something weird is happenning here.
Interesting code though (like that it's in English again... almost), and I like the idea. You can do the same thing in Studio if you use the upgrade TM route and this will not only remove the duplicates but it will create a single TM for you (If you want) with the results and it will carry out more checks on the integrity of the TM that just duplicate removal. But I guess this script has the potential to be faster in the end if it worked and could be relied upon.
1.Thanks for your precious time to meticulously test my humble codes.Really appreciated.
2.I have forgotten to mention that this post stems from following post;
Is there a best practice for importing new segments into a large TM?community.sdl.com/.../is-there-a-best-practice-for-importing-new-segments-into-a-large-tm
Only for this.3.I guess (rather I hope), the problem solved a little bit.
At least, That worked as I intended/imagined.I have left all the evidences at main post.That is good enough for me
4.I have deleted all the realted files in my computer (this is not my prblem)Nobody knows but, Making the situation from my side (it is called Reproduce) is VERY, VERY and VERY painful , silly and meaningless steps.
I do not want to do it again.
5.Duplicated ? Who cares ?Forget about this codes.Just use your TMs.There is no serious performance hit absolutely - for instance, it takes an hour to find its fuzzis or something.
On 2nd thoughtI have changed my mindBecause, You are the only one who knows what I am doing here (including all of the other posts too)
So, Let me nice again....
The key logic of this post has the same logic as I used at "To extract TM [3/3] - inconsistencies"I just have changed only one character
If you have any doubt about what the heck is "Common", run the code I mentioned above. Then you will know it 101% clearly (ah.. at there, I have failed to give you the clear idea of mine too)Then that could prove that I am (not) wrong here..
Good Luck To You
ah, you wrote some long noteBut.. I am a little bit not interested in it now (most importantly, you are not a DamzelinDistress)If I change my mind, I will take care of the other sad stories you wrote