tokeniseSpans method

  1. @override
List<TokenSpan> tokeniseSpans(
  1. String text
)
override

Segments text into word tokens with their character offsets.

Equivalent to tokenise but additionally reporting each token's (start, end) span. An empty text must return an empty list without error.

Implementation

@override
List<TokenSpan> tokeniseSpans(String text) =>
    throw UnsupportedError('IcuTokenizer is not available on web targets.');