Dela via


SelectableWordsSegmenter Class

Definition

A segmenter class that is able to segment provided text into units appropriate for selecting text by words.

The language supplied when this object is constructed is matched against the languages with word breakers on the system, and the best word segmentation rules available are used. The language need not be one of the app's supported languages. If there are no supported language rules available specifically for that language, the language-neutral rules are used (an implementation of Unicode Standard Annex #29 Unicode Text Segmentation), and the ResolvedLanguage property is set to "und" (undetermined language).

public ref class SelectableWordsSegmenter sealed
/// [Windows.Foundation.Metadata.Activatable(Windows.Data.Text.ISelectableWordsSegmenterFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [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 SelectableWordsSegmenter final
/// [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)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Data.Text.ISelectableWordsSegmenterFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class SelectableWordsSegmenter final
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Data.Text.ISelectableWordsSegmenterFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[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 SelectableWordsSegmenter
[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)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Data.Text.ISelectableWordsSegmenterFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class SelectableWordsSegmenter
function SelectableWordsSegmenter(language)
Public NotInheritable Class SelectableWordsSegmenter
Inheritance
Object Platform::Object IInspectable SelectableWordsSegmenter
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)

Constructors

SelectableWordsSegmenter(String)

Creates a SelectableWordsSegmenter object. See the introduction in SelectableWordsSegmenter for a description of how the language supplied to this constructor is used.

Properties

ResolvedLanguage

Gets the language of the rules used by this SelectableWordsSegmenter object.

"und" (undetermined) is returned if we are using language-neutral rules.

Methods

GetTokenAt(String, UInt32)

Determines and returns the selectable word or word stem which contains or follows a specified index into the provided text.

GetTokens(String)

Determines and returns all of the selectable words or word stems in the provided text.

Tokenize(String, UInt32, SelectableWordSegmentsTokenizingHandler)

Calls the provided handler with two iterators that iterate through the selectable words prior to and following a given index into the provided text.

Applies to