I have the impression all Anglophones pronounce contrary with stress on the second syllable (cont-RARE-ee) when applied to a person's actions or disposition, as in:
Mary Mary quite contrary,
How does your garden grow?
With silver bells and cockle shells
And pretty maids all in a row.
...but it's nearly always stressed on the first syllable (CONT-rər-ee) in all other contexts.
It's still the same word, and I can't really see any difference in meaning apart from that which arises naturally by virtue of it being applied to a person, rather than something abstract/inanimate.
Is my impression correct? If so, is there any reason? It can't just be for the sake of that well-known nursery rhyme, can it?
I know I probably shouldn't ask, but are there any other cases where "the same word" has a different stress pattern according to context? (I'm not counting things like You don't haff to do that, where the consonant can change according to whether the word is stressed or not.)