https://www.proz.com/forum/sdl_trados_support/127109-%22unexpected_end_of_segment%22_error.html

"Unexpected end of segment!" error
Thread poster: Brandon Wood
Brandon Wood
Brandon Wood  Identity Verified
Japan
Local time: 02:49
Japanese to English
+ ...
Feb 9, 2009

Hello all, sorry for all the questions recently... but I think I am working with the most unreliable TM and source files ever.

I am now having a problem pre-translating two of my TTX source files. When I try to translate them in the Workbench, everything seems to be working properly until it reaches the "postprocessing" step at which point the bar turns red and I get the error "(-2147467259): Unexpected end of segment!".

I assume that this means something is wrong with
... See more
Hello all, sorry for all the questions recently... but I think I am working with the most unreliable TM and source files ever.

I am now having a problem pre-translating two of my TTX source files. When I try to translate them in the Workbench, everything seems to be working properly until it reaches the "postprocessing" step at which point the bar turns red and I get the error "(-2147467259): Unexpected end of segment!".

I assume that this means something is wrong with my TM... as in, perhaps a segment in the TM is not closed properly or something? I did a search on Google and the TRADOS website and got absolutely nothing for that error message. Am I the only one ever to have seen it?

The TM itself has been a problem from the beginning of this entire project. I didn't pre-translate the previous files in the project thus far because there were so many translation errors in the translations provided to me that I wanted to fix them up a little if possible, but then I realized that I'm not getting paid for this and the client ignored me when I informed them of all the errors so I decided to save myself time and stress by simply pre-translating the files beforehand. But, while I was translating the first files every once in a while a 100% match segment would show up that would cause an exception in the Workbench. It wouldn't crash, but it would not insert the translation into TagEditor. I found out that this exception was being caused by a strange tag in those translations. It was a "XE" tag, and showed up in the Workbench as {XE}. I had to edit these segments by hand in the TM to remove the {XE} and then when the target segment was opened TagEditor could retrieve the translation with no problems and without any exceptions being thrown.

Now I'm wondering if it is these same tags that are causing this unexpected end of segment error when I try to pre-translate, since I am not able to manually remove them when they show up. I'd really like to be able to pre-translate these documents, as just pre-translating one of them eliminates 33924 characters of text for me to wade through in TagEditor.

Thanks in advance,
Brandon
Collapse


 
Daniel Grau
Daniel Grau  Identity Verified
Argentina
Member (2008)
English to Spanish
{XE} fields are cross-entries for the alphabetical index Feb 9, 2009

In Word, you would add this field to mark a place in the document whose page number should be referred to in an alphabetical index. Suppose you have the following sentence on page 25:

We pointed to that product {XE "product pointing"} in particular.

When you generate the index, you get this entry:

product pointing.................25

Therefore, to be meaningful, the XE field should always contain a quoted string. However, Word itself wi
... See more
In Word, you would add this field to mark a place in the document whose page number should be referred to in an alphabetical index. Suppose you have the following sentence on page 25:

We pointed to that product {XE "product pointing"} in particular.

When you generate the index, you get this entry:

product pointing.................25

Therefore, to be meaningful, the XE field should always contain a quoted string. However, Word itself will accept such null fields without complaining. Trados, in its wisdom, probably has decided that there has to be a string there, in particular if the field itself constitutes the whole segment.

Fields can be manually found by searching for ^d. I'm guessing you will have to delete them all, but one by one, since ^d does not discriminate between valid fields and blank fields.

Or, if you ask for it, someone might write a "Blank-field deleting macro." It could even start with something like "For each OpenDocument in Application.Documents" to let you batch-process a large number of files at once.

Regards,

Daniel
Collapse


 
Brandon Wood
Brandon Wood  Identity Verified
Japan
Local time: 02:49
Japanese to English
+ ...
TOPIC STARTER
Still getting the same error... Feb 9, 2009

I managed to delete all XE tags from the TM by exporting the TM and then doing a logical expression search to remove all the tags in Word. I then re-imported the TM and tried again, but I am still getting this "Unexpected end of segment!" error when pre-translating the document.

One of the three files I'm working on pre-translated successfully, so I'm working on it at the moment hoping to resolve this issue for the other two, but if not I suppose I'll just have to go through each se
... See more
I managed to delete all XE tags from the TM by exporting the TM and then doing a logical expression search to remove all the tags in Word. I then re-imported the TM and tried again, but I am still getting this "Unexpected end of segment!" error when pre-translating the document.

One of the three files I'm working on pre-translated successfully, so I'm working on it at the moment hoping to resolve this issue for the other two, but if not I suppose I'll just have to go through each segment one-by-one since I'm running out of time.

Thanks for the info about XE fields though!
Collapse


 
Daniel Grau
Daniel Grau  Identity Verified
Argentina
Member (2008)
English to Spanish
Wrong segment is not in TM Feb 9, 2009

I believe the wrong segment to blame is in the document, Brandon, not in the TM. I guess you should delete it in the document.

I don't have Trados but Wordfast (on Mac), so I'm basing my comments on my experience with this platform.


 
Brandon Wood
Brandon Wood  Identity Verified
Japan
Local time: 02:49
Japanese to English
+ ...
TOPIC STARTER
I'm not sure... Feb 9, 2009

The reason why I didn't think the problem was with XE tags in the document is because Trados only crashes when the problematic XE tag is present in the target translation in the TM. There are no XE tags in the source document. I believe that they were at one point, but may have been taken out in this update to the manual so some of the translations in the TM still have them there.

I'm thinking now that this error is not being caused by the XE tags anyway now. They may/probably don't
... See more
The reason why I didn't think the problem was with XE tags in the document is because Trados only crashes when the problematic XE tag is present in the target translation in the TM. There are no XE tags in the source document. I believe that they were at one point, but may have been taken out in this update to the manual so some of the translations in the TM still have them there.

I'm thinking now that this error is not being caused by the XE tags anyway now. They may/probably don't have anything to do with the "Unexpected end of segment!" error, but I was just thinking that was a possibility since that does crash the Workbench when they appear.

I wish it was a more meaningful error description, such as if it is an unexpected end of segment in the TM or in the document, so I could narrow this down...
Collapse


 
Giuliana Buscaglione
Giuliana Buscaglione  Identity Verified
United States
Local time: 10:49
Member (2001)
German to Italian
+ ...
File error Feb 9, 2009

Hi Brandon,

normally, an end of segment error means that a tag in the document is corrupted, i.e you accidentally deleted while translating. Have you set TE so that "external tags" are protected? I am not sure I understand the relation with a bad (translation in the??) TM, as what is between TE or in MSWord tags is irrelevant for the macro.

??

Giuliana


 
Daniel Grau
Daniel Grau  Identity Verified
Argentina
Member (2008)
English to Spanish
Try exporting the TM to check it Feb 9, 2009

If you cannot see clearly the structure of the faulty TM unit to decide whether its corrupt or not, export the TM or part of it using one of the formats that can be read with a word processor (like text or TMX). You'll probably need to tell Word to "Confirm conversions" and then open the file as text only. Then you will be able to analyze whether the unit is truncated or not, as the elements are quite symmetrical (for every "{" there is a "}"; same for ""). For instance, in TMX format, an XE fie... See more
If you cannot see clearly the structure of the faulty TM unit to decide whether its corrupt or not, export the TM or part of it using one of the formats that can be read with a word processor (like text or TMX). You'll probably need to tell Word to "Confirm conversions" and then open the file as text only. Then you will be able to analyze whether the unit is truncated or not, as the elements are quite symmetrical (for every "{" there is a "}"; same for ""). For instance, in TMX format, an XE field should look like this:


Page {\field {\fldinst XE}}


Anyway, don't confuse "segments" (text) with "units" (TM).

Perhaps Trados is complaining because there is an XE field in the target, while not so in the source? In addition, parsing the input and generating an output are two separate processes. Thus, one can accept things that the other rejects.

Daniel
Collapse


 
Brandon Wood
Brandon Wood  Identity Verified
Japan
Local time: 02:49
Japanese to English
+ ...
TOPIC STARTER
Problem with TagEditor Feb 9, 2009

I believe that the problem is not with the TM at all anymore.

I just tried pre-translating the document in its original DOC format, instead of pre-translating the TTX file and it worked perfectly fine. Unfortunately, due to the large number of bookmarks, links, textboxes, etc. I need to use TagEditor in order to translate this document with Trados.

I think that the error may be when Trados is converting the document into TTX format, but I'm not sure about that either. T
... See more
I believe that the problem is not with the TM at all anymore.

I just tried pre-translating the document in its original DOC format, instead of pre-translating the TTX file and it worked perfectly fine. Unfortunately, due to the large number of bookmarks, links, textboxes, etc. I need to use TagEditor in order to translate this document with Trados.

I think that the error may be when Trados is converting the document into TTX format, but I'm not sure about that either. The sad thing is when I look at the pre-translated DOC file, the only parts I need to translate are at the very end of the document. I'd hate to waste all my time clicking through the first 180 pages of the document when I could have Trados translate all that for me...
Collapse


 
Renée van Bijsterveld
Renée van Bijsterveld  Identity Verified
Netherlands
Local time: 19:49
Member (2007)
English to Dutch
+ ...
Translate in Word and TE Feb 9, 2009

Brandon Wood wrote:

I believe that the problem is not with the TM at all anymore.

I just tried pre-translating the document in its original DOC format, instead of pre-translating the TTX file and it worked perfectly fine. Unfortunately, due to the large number of bookmarks, links, textboxes, etc. I need to use TagEditor in order to translate this document with Trados.

I think that the error may be when Trados is converting the document into TTX format, but I'm not sure about that either. The sad thing is when I look at the pre-translated DOC file, the only parts I need to translate are at the very end of the document. I'd hate to waste all my time clicking through the first 180 pages of the document when I could have Trados translate all that for me...


Hi,
Would it be possible to translate only the parts you need to translate (as you say, at the end of the document) in TE, in a clean (not pretranslated) TTX file, and than pretranslate your Word doc with the updated TM?


 
Vito Smolej
Vito Smolej
Germany
Local time: 19:49
Member (2004)
English to Slovenian
+ ...
SITE LOCALIZER
DOC, RTF and TTX Feb 9, 2009

I got used to dumping DOC as soon as I can and use RTF as much as/wherever I can.

 
Michael McCain (X)
Michael McCain (X)  Identity Verified
France
Local time: 19:49
Arabic to English
+ ...
Reorganize the TM Apr 20, 2011

In my case I was able to resolve this problem by reorganizing the TM (File/Reorganise in TWB).

Michael


 


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


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

"Unexpected end of segment!" error


Translation news related to SDL Trados





Anycount & Translation Office 3000
Translation Office 3000

Translation Office 3000 is an advanced accounting tool for freelance translators and small agencies. TO3000 easily and seamlessly integrates with the business life of professional freelance translators.

More info »
Wordfast Pro
Translation Memory Software for Any Platform

Exclusive discount for ProZ.com users! Save over 13% when purchasing Wordfast Pro through ProZ.com. Wordfast is the world's #1 provider of platform-independent Translation Memory software. Consistently ranked the most user-friendly and highest value

Buy now! »