No, because you don't predict the probability of a token, you predict the probability of a token _given_ a preceding sequence of tokens.
So, to decide whether to follow "I climbed the apple tree and picked" with "a" or "an", you calculate the following (which are conditional probabilities; read p(A|B) as "probability of A given B):
P₁ = p(a|I,climbed,the,apple,tree,and,picked)
P₂ = p(an|I,clibed,the,apple,tree,and,picked)
Now, if P₁ > P₂, you generate "a", otherwise you generate "an".Note that the sentence "I climbed the apple tree and picked" is different than the sentence "I climbed the pear tree and picked" so the following are different probabilities, also:
P₃ = p(a|I,climbed,the,pear,tree,and,picked)
P₄ = p(an|I,clibed,the,pear,tree,and,picked)
So you'll get a different token generated depending on whether P₃ > P₄ or not.In short, yeah, you can choose whether it's going to be "a" or "an" according to the context of the sentence so-far.
But even in cases where you can't do that, when you don't have the context of "pear" or "apple", what you _can_ do is generate this string:
"I climbed the pear tree and picked a"
And then calculate the following probabilities:
P₅ = p(ball|I,climbed,the,tree,and,picked,a)
P₆ = p(abacus|I,clibed,the,tree,and,picked,a)
And if P₅ > P₆ you'll generate "ball", otherwise generate "abacus". So you
don't have to know what's coming next, just what you've generated so-far.Does that help?