Added Trie implementation for POS dictionary construction