.onChange(of: textInput) { old, new in
   let tagger = NLTagger(tagSchemes: [.tokenType])
   tagger.string = new

   var listWords = ""
   let tags = tagger.tags(in: new.startIndex ..< new.endIndex, unit: .word, scheme: .tokenType)
   for (tag, range) in tags {
      if let tag = tag {
         switch tag {
            case .word:
               listWords += "Word: \(new[range])\n"
            case .punctuation:
               listWords += "Punctuation: \(new[range])\n"
            default:
               break
         }
      }
   }
   message = listWords
}