WordSegmentsTokenizingHandler Delegate
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Defines the signature of a function that is provided to WordsSegmenter.Tokenize.
public delegate void WordSegmentsTokenizingHandler(IIterable<WordSegment ^> ^ precedingWords, IIterable<WordSegment ^> ^ words);
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(2782749527, 48938, 19535, 163, 31, 41, 231, 28, 111, 139, 53)]
class WordSegmentsTokenizingHandler : MulticastDelegate
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Guid(2782749527, 48938, 19535, 163, 31, 41, 231, 28, 111, 139, 53)]
public delegate void WordSegmentsTokenizingHandler(IEnumerable<WordSegment> precedingWords, IEnumerable<WordSegment> words);
var wordSegmentsTokenizingHandlerHandler = function(precedingWords, words){
/* Your code */
}
Public Delegate Sub WordSegmentsTokenizingHandler(precedingWords As IEnumerable(Of WordSegment), words As IEnumerable(Of WordSegment))
- precedingWords
Contains the selectable words, in reverse order, that precede the parameter startIndex that is provided to WordsSegmenter.Tokenize.
- words
Contains the selectable words that contain or follow the parameter startIndex that is provided to WordsSegmenter.Tokenize.
- Attributes
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)
|
One iterator passed to the handler iterates through all the words in the provided text that occur prior to the parameter startIndex (passed to Tokenize), in reverse order. The other iterator iterates through all the 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.
Product | Versions |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |