This is the first part of another question of mine that had a recommendation to make it two questions: Adding Accents to Speech Generation.
Summary: The other question asks how to add an accent programatically to generated speech. Not an accent mark or inflection, but a full accent like a British or Scottish or Russian one.
The first question (same as this one) asks how the original text could be analyzed to determine what accents need to be added and where.
Basically, how could text be analyzed to find these accents and generate a set of instructions that could be used to add any accent to any generated speech?