Counting words in sentences around queries