getPinyinTones static method

List<int> getPinyinTones(
  1. String sentence
)

Returns a list of tones for the whole sentence

Implementation

static List<int> getPinyinTones(String sentence) {
  return splitToSyllables<SyllableData>(sentence)
      .where((e) => e.isValid)
      .map(
        (e) => e.value,
      )
      .map(getPinyinTone)
      .toList();
}