Exactly like a phone could do, if you wired autocorrect to those outputs.
It is software. Even the supposedly indeterministic parts are ultimately deterministic. The computer processes 1s and 0s. If given the same 1s and 0s, it would do the same thing. It's basically a pseudorandom number generator with weighted outputs.