Aesthetically pleasing words flow from the mouth and sound beautiful to the ears.
The algorithm isnt perfect but it does a pretty good job for most common nouns.
Tables of contents in Word are formulated using styles in documents, so the level of header will appear as a level in the table.