segmentZhString function

String segmentZhString(
  1. String word, {
  2. SegmentOptions options = const SegmentOptions(),
})

Segments word and returns the original text as a single string.

Equivalent to segmentPinyin with OutputFormat.zhString.

Implementation

String segmentZhString(String word,
    {SegmentOptions options = const SegmentOptions()}) {
  return segmentPinyin(
    word,
    options: options.copyWith(format: OutputFormat.zhString),
  ) as String;
}