For example, in the second bag {cat, on, the}, if looking only locally, we may pick "the" as the left neighbor of "cat".
if we notice that there is another determiner "a" in the first bag, then "the" will not be the only choice.