add the simple and force q-gram algorithm
add test code