deal with utf tag and avoid large pairwise computation