add inverted index and unit test
add pmi and related code