Share via


AlternateWordForm Class

Definition

Identifies an alternate form of the word represented by a WordSegment object. For example, this may contain a number in a normalized format.

public ref class AlternateWordForm sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class AlternateWordForm final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class AlternateWordForm
Public NotInheritable Class AlternateWordForm
Inheritance
Object Platform::Object IInspectable AlternateWordForm
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

Your code does not create instances of this class. It retrieves them from a WordSegment.AlternateForms list.

The value of the AlternateNormalizationFormat property indicates the normalization format used to format the AlternateText property. It is one of the following possible normalization formats.

When NormalizationFormat property is AlternateNormalizationFormat.Number, "." is used to indicate the decimal separator, and a leading "-" indicates that the number is negative.

When NormalizationFormat is AlternateNormalizationFormat.Currency, "." is used to indicate the decimal separator, a leading "-" indicates that the number is negative, and the text following the last digit is the currency symbol.

When NormalizationFormat is AlternateNormalizationFormat.Date, the result is "YYYY-MM-DD", where "YYYY" is the Gregorian year (0-padded), "MM" is the numerical month (0-padded), and "DD" is the day (0-padded).

When NormalizationFormat is AlternateNormalizationFormat.Time, the result is "HH:MM:SS", where "HH" is the hour in 24-hour time (0-padded) (0-23), "MM" is the minute (0-padded), and "SS" is the seconds (0-padded).

Properties

AlternateText

Gets the text of the alternate word form identified by this AlternateWordForm object.

NormalizationFormat

Gets the normalization format for this current AlternateWordForm object.

SourceTextSegment

Gets the TextSegment that identifies the source text's sub-string for which this AlternateWordForm object is an alternate.

Applies to