The intuition behind this algorithm is that different sets of sentences are likely to manifest different syntactic patterns.
the best way to learn the syntactic patterns of any given set of sentences might be to train the parser on the sentences contained in the set.