Share via


SelectableWordSegmentsTokenizingHandler Delegate

Definition

Defines the signature of a function that is provided to SelectableWordsSegmenter.Tokenize.

public delegate void SelectableWordSegmentsTokenizingHandler(IIterable<SelectableWordSegment ^> ^ precedingWords, IIterable<SelectableWordSegment ^> ^ words);
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(977140892, 44766, 19911, 158, 108, 65, 192, 68, 189, 53, 146)]
class SelectableWordSegmentsTokenizingHandler : MulticastDelegate
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Guid(977140892, 44766, 19911, 158, 108, 65, 192, 68, 189, 53, 146)]
public delegate void SelectableWordSegmentsTokenizingHandler(IEnumerable<SelectableWordSegment> precedingWords, IEnumerable<SelectableWordSegment> words);
var selectableWordSegmentsTokenizingHandlerHandler = function(precedingWords, words){
/* Your code */
}
Public Delegate Sub SelectableWordSegmentsTokenizingHandler(precedingWords As IEnumerable(Of SelectableWordSegment), words As IEnumerable(Of SelectableWordSegment))

Parameters

precedingWords

IIterable<SelectableWordSegment>

IEnumerable<SelectableWordSegment>

Contains the selectable words, in reverse order, that precede the parameter startIndex that is provided to SelectableWordsSegmenter.Tokenize.

words

IIterable<SelectableWordSegment>

IEnumerable<SelectableWordSegment>

Contains the selectable words that contain or follow the parameter startIndex that is provided to SelectableWordsSegmenter.Tokenize.

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

One iterator passed to the handler iterates through all the selectable words in the provided text that occur prior to startIndex (passed to Tokenize), in reverse order. The other iterator iterates through all the selectable words in the provided text that contain or follow startIndex.

Example: If you provide Tokenize with "this is a simple example" and startIndex within the word "simple", precedingWords iterates through the words "a ", "is ", "this ", and words iterates through the words "simple ", "example".

precedingWords and words are valid only during the lifetime of the handler.

Applies to

See also