Edited inverted index

Still have problem of multiple instances leads to multiple
records
Made the words a set
Solved the first problem.