Trie based tokenizer in C and Python wrapper