by hnfong · 3y ago · 0 comments
The simplest way to do it, is to convert all the words to (normal_form, orig_word) pairs, write the list to a file, then sort it.
It will be trivial to find the words with common normal form after the sort.
(Of course, you wouldn't catch me trying to implement that with C if perl is an option...)
No hash table needed, just splitting the line into the two fields, equality comparison, and appending values to a list.