WordSegmentsTokenizingHandler
WordSegmentsTokenizingHandler
WordSegmentsTokenizingHandler
WordSegmentsTokenizingHandler
Delegate
Definition
Defines the signature of a function that is provided to WordsSegmenter.Tokenize.
public : delegate void WordSegmentsTokenizingHandler(IIterable<WordSegment> precedingWords, IIterable<WordSegment> words)public delegate void WordSegmentsTokenizingHandler(IEnumerable<WordSegment> precedingWords, IEnumerable<WordSegment> words)Public Delegate WordSegmentsTokenizingHandler(precedingWords As IEnumerable<WordSegment>, words As IEnumerable<WordSegment>)// You can use this delegate in JavaScript.
- precedingWords
- IIterable<WordSegment> IEnumerable<WordSegment> IEnumerable<WordSegment> IEnumerable<WordSegment>
Contains the selectable words, in reverse order, that precede the parameter startIndex that is provided to WordsSegmenter.Tokenize.
- words
- IIterable<WordSegment> IEnumerable<WordSegment> IEnumerable<WordSegment> IEnumerable<WordSegment>
Contains the selectable words that contain or follow the parameter startIndex that is provided to WordsSegmenter.Tokenize.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Remarks
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.