Namespace Sdl.LanguagePlatform.Core.Segmentation
Classes
Context
Describes the context of a pre-break or post-break segmentation rule. The context encapsulates a regular expression pattern as well as match flags.
LocalizedString
Represents a collection of culture-annotated strings.
SegmentationContext
A segmentation context consists of a context which should precede the match, and a context which should follow a match. For performance reasons, it may also contain a list of trigger characters which, if specified, are used to determine whether a specific context is probed for matching or not.
A null context matches every position. Therefore, if the preceding context is null, the segmentation context matches at each position which is not excluded by the following context. If the following context is also null, the segmentation context will match everywhere in the input string.
If the trigger characters are specified, they should consist of all characters which may appear at the end of the preceding context. If the trigger characters are specified, but the preceding context is null, the rule will only be tested for those positions in the string where one of the trigger characters is found. In that case, as the preceding context is null, the rule will "fire" at each of the positions of any trigger character.
SegmentationRule
A segmentation rule consist of at least one "positive" SegmentationContext (the matching context) and a possibly empty set of exceptions.
A segmentation rule "fires" if the matching context matches a specified position, and either the exception list is empty or none of the exceptions matches the same position in the input.
SegmentationRules
A collection of segmentation rules.
Enums
ContextType
The type of a break context
RuleOrigin
The rule origin
RuleType
The type of a segmentation rule