Interface ISegment
Inherited Members
Namespace: SdlSdl.FileTypeSupportFrameworkBilingualApi
Assembly: Sdl.FileTypeSupport.Framework.Core.dll
Syntax
public interface ISegment : IAbstractMarker, IAbstractMarkupData, ICloneable, IAbstractMarkupDataContainer, ISupportsUniqueId, IList<IAbstractMarkupData>, ICollection<IAbstractMarkupData>, IEnumerable<IAbstractMarkupData>, IEnumerable
Remarks
A segment is a piece of localizable content (text and tags etc.) for which existing translations can possibly be re-used. What exactly counts as a segment is determined by the segmentation engine. In practice, a segment is typically a sentence.
The process of dividing the source content into segments usually takes place when the file is first processed. This process is performed by the segmentation engine, a bilingual content processor that is invoked after the bilingual content processors, which are part of the extractor. Bilingual content processors that are defined as part of the extractor will therefore not receive content that has been processed by the segmentation engine.
Content originating from bilingual file types (e.g. TTX, ITD, or XLIFF) may contain segments even if it has not yet been processed by the segmentation engine.
A segment that appears in the Target always has a corresponding source language version that appears in the Source. The combination of source and target segments is called segment pair. They reference the same ISegmentPairProperties object.
The Properties of the segment contains information on its translation status.
You can locate the corresponding source/target segment through the methods GetSourceSegment(SegmentId) and GetTargetSegment(SegmentId). The segment pairs in a paragraph unit can also be enumerated by using SegmentPairs.
It is important to note that not all content inside the source and target of a paragraph unit appears inside a segment. There can also be content outside of segments, such as spaces between sentences, tags, and other elements that the segmentation engine has not considered part of a segment.
Properties
ParentParagraphUnit
The ParagraphUnit the segment appears in, or null
if none.
Declaration
IParagraphUnit ParentParagraphUnit { get; }
Property Value
Type | Description |
---|---|
IParagraphUnit |
Properties
The properties common between the corresponding source and target segments
Declaration
ISegmentPairProperties Properties { get; set; }
Property Value
Type | Description |
---|---|
ISegmentPairProperties |
Remarks
Matching source and target segments in a ParagraphUnit must reference the same segment pair properties object instance.