An A* based semantic tokenizer for increasing the performance of semantic applications