generate bigram index and base index separately
add template class , able to give scores