Patricia trie implementation for dictionaries