tokenizeWords function
Splits text into words (non-empty runs of letters/numbers).
Implementation
List<String> tokenizeWords(String text) => text
.split(RegExp(r'\s+'))
.map((String s) => s.replaceAll(RegExp(r'[^\w]'), '').trim())
.where((String s) => s.isNotEmpty)
.toList();