Complex sentence: The latter is based on counting of the number of common n-grams, and is used mostly for filtering.
Split into simpler sentences: The latter is based on counting of the number of common n-grams. It is used mostly for filtering.