Plan 9 from Bell Labs’s /usr/web/sources/contrib/tristan/dict/mkindex.acme
1,$ s,^([0-9]+) (.*)$,\2 \1,g 1,$ s/[,.;:]+//g 1,$ |sort -u -t' ' +0f -1 +0 -1 +1n -2