The auto - gen programs do a lot by context ( list of words most likely to follow)
and for Queen's jubilee, it far more likely to be green jubilee
and as for Prince WIlliam, instead of a brother named harry, it is far more likely to be associated with hisbo-allahi ( arabic for party-of-god but the computer probably knows that already)
[actually seriously folks ( thx to David Frost] I am astounded they can get these progz to work at all. The French ones arent bad]