The QuickType/Predictive typing feature found in iOS 8 has made its way to OS X Yosemite.
Although a similar feature has been used in OS X since at least Snow Leopard, accessible by hitting the ESC key, this ups the functionality by not just offering an autocomplete/autocorrect feature, but actually suggesting entire untyped words which can go on to write complete sentences.
The feature is activated by pressing the ESC key to make a drop-down menu appear, containing words OS X thinks belong next to your previous word. Hitting SPACE BAR will then insert a highlighted word along with a space.
Currently the feature works only in a few applications, including TextEdit, although it is likely that Apple will add further compatibility over time. As can be seen from the above image, it is also possible for the code to get locked into an infinite loop of sorts, with a certain string of words being repeated without end.
Going forward it will be interesting to see how far Apple takes this technology; not just in terms of frequently used words, but also learning typical sentence structure on the part of users. Over time this could turn out to be an immensely valuable tool.