Documentation Center

Placeholder repair (enabled by default)

Overview

DescriptionAttempts to repair placeholder differences.
DefaultEnabled
Supported Attributestarget_languages

enabled

unsafe_repair_penalty

Details

WorldServer requires that the number of placeholders in the source and target text match for internal alignment. If the lookup has more placeholders than the source and targets, then additional placeholders are added to the source and target of the TM match during the repair process. If the lookup has fewer placeholders, then placeholders will be stripped from the source and target segments. Where possible, the repair process attempts to remove and place the placeholder indicators in the appropriate locations within the segments. When this not possible, the placeholder indicators may be placed at the beginning or end of the segment.
In the following example, the lookup segment contains zero placeholders, so to improve the match and facilitate internal alignment, the placeholders have been stripped out of the source and target segments:
Lookup Segment: This is simple.
Source Segment: This {1}is{2} simple.
Target Segment: Must this {1}be{2} so simple?
Repaired Source Segment: This is simple.
Repaired Target Segment: Must this be so simple?
In the following example, the lookup has additional placeholders. The repair process adds additional ones to both the source and target segments. Location is based on segment similarities and differences. This scenario tries to match up the outside placeholders based on the lookup segment.
Lookup Segment: {1}{2}This is foo.{3}{4}
Source Segment: {1}This is foo.{2}
Target Segment: {1}Foo is here.{2}
Repaired Source Segment: {1}{2}This is foo.{3}{4}
Repaired Target Segment: {1}{2}Foo is here.{3}{4}
In the following example, the lookup has additional placeholders. The repair process adds additional ones to both the source and target segments. Location is based on segment similarities and differences. The target repairs are done somewhat arbitrarily in this case since there is no way to exactly determine the location of the placeholders.
Lookup Segment: {1}This{2} is {3}foo{4}
Source Segment: {1}This is foo{2}
Target Segment: {1}Foo is this{2}
Repaired Source Segment: {1}This{2} is {3} foo{4}
Repaired Target Segment: {1}{2}{3}Foo is this{4}
In the following example, the placeholder indicators have been shifted to match the lookup.
Lookup Segment: {1}{2}This is foo.
Source Segment: {1}This is foo.{2}
Target Segment: {1}Foo is this.{2}
Repaired Source Segment: {1}{2}This is foo.
Repaired Target Segment: {1}{2}Foo is this.

Placeholder placement is based on the lookup segments because the lookup segment is the segment being translated. In the rendered document, the actual values substituted for the placeholders will come from the document or asset associated with the lookup segments.

Safe Placeholder Repair

The safe placeholder repair identifies a subset of placeholder repairs that are considered as safe (or minimal risk) placeholder repairs. These repairs involve placeholder scenarios that are highly deterministic in regards to the proper placement and removal of placeholders in the TM match being repaired. The current implementation restricts the designation of safe placeholder repairs to TM match segments that contain boundary placeholders only or to cases where all placeholders are to be removed. Cases involving the placement of embedded placeholders are deemed not safe.
In the following example, all of the placeholders are boundary placeholders, and so this is considered a safe repair:
Lookup Segment: {1}{2}This is foo.{3}{4}
Source Segment: {1}This is foo.{2}
Target Segment: {1}Foo is here.{2}
Repaired Source Segment: {1}{2}This is foo.{3}{4}
Repaired Target Segment: {1}{2}Foo is here.{3}{4}
The following example is not considered a safe repair. The proper placement of internal (embedded) placeholders within the target segment is hard to determine definitively.
Lookup Segment: {1}This{2} is {3}foo{4}
Source Segment: {1}This is foo{2}
Target Segment: {1}Foo is this{2}
Repaired Source Segment: {1}This{2} is {3} foo{4}
Repaired Target Segment: {1}{2}{3}Foo is this{4}

Unsafe repair penalty attribute

The unsafe_repair_penalty attribute (default value is 0.0) – allows the user to set a final scoring penalty to be assessed if the placeholder repair that has been applied is not deemed by the system as safe. Safe placeholder repair support is not an explicit repair option, although the system supports identifying these types of repair conditions. This option effectively allows the user to prevent unsafe repairs from being scored up to 100% matches. Set the value between 0.0 and 1.0. A practical value is 0.01, which translates into a 1% final score penalty.

Recommendation

SDL encourages customers to analyze the quality of all placeholder repairs. We also recommend that you at least accept safe placeholder repairs. In fact, in many cases, placeholder repairs that have not been explicitly deemed safe have in fact resulted in high quality results. Given the potential benefit of these repairs, we recommend that you evaluate the samples from your data scenarios. While the placeholder repair is required for WorldServer internal alignment, you can choose to completely disable this repair’s impact on the final score or simply add a penalty for unsafe placeholder repairs.