libavrophonetic icon indicating copy to clipboard operation
libavrophonetic copied to clipboard

Add comprehensive tests for classic phonetic

Open mugli opened this issue 3 years ago • 2 comments

testdata.txt is just a placeholder now. Need to add comprehensive testcases to cover all the patterns and exceptions.

mugli avatar Mar 07 '21 12:03 mugli

One question bhai, why do you use a string for is completed value for the Trie Node instead of a boolean? Just curious.

milon avatar Jul 20 '22 19:07 milon

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.

mugli avatar Jul 20 '22 20:07 mugli