Here are the rules as stated in the Macintalk documentation; although they are stated as if they are absolute rules, you should always trust your own ears over these rules:
1) Always place a stress mark in a ΓÇ£contentΓÇ¥ word. A content word is a word that carries meaning. Nouns, adjectives and verbs are content words. Articles and conjunctions are not content words. The word ΓÇ£isΓÇ¥ is not generally a content word. Prepositions are not content words. All of these are called ΓÇ£functionΓÇ¥ words.
2)Always place a stress mark on the accented syllable(s) of polysyllabic words, whether content or function. If more than one syllable is stressed, the one that gets the most stress gets the primary stress, and the other stressed syllables get secondary stresses; these should be marked with a value of only 1 or 2. Compound words (like ΓÇ£baseballΓÇ¥ or ΓÇ£bandwagonΓÇ¥ ) should be treated as two separate words for the purposes of placing stress.