@Frinklang (let $d:=unparsed-text('https://t.co/Qk5txYZySy'),
$t:=(tokenize($d, '\W+')[normalize-space()] ! lower-case(.) ! normalize-unicode(., 'NFC'))
return
for $s in $t
let $k:=$s
group by $k
let $c:=count($s)
order by $c descending
return &lt;w k="{$k}" c="{$c}"/&gt;)[position()=(1 to 10)]