inverted indices example
fixed the logic to merge lines per word, fixing the word occurance count in each line