libavrophonetic
libavrophonetic copied to clipboard
Add comprehensive tests for classic phonetic
testdata.txt is just a placeholder now. Need to add comprehensive testcases to cover all the patterns and exceptions.
One question bhai, why do you use a string for is completed value for the Trie Node instead of a boolean? Just curious.
Storing the complete word to avoid traversing and rebuilding them every time we reach a complete node. It saves both time and unnecessary allocation (lot of string concatenation). And since the complete words are saved anyway in the right nodes, we don't need another marker for that, saves at least a byte for each word.