Interestingly, the plain ‘take’ type of command is one of the few situations where the parser will ordinarily not make a guess as to the object(s) intended.
The parser doesn’t attempt to guess when:
(i) no noun-matching words are supplied at all, but more than one object could equally-plausibly (according to the parser’s disambiguation rules) make sense in context
→ e.g. ‘take’, ‘take the bead from’, leading to ‘what do you want to take?’ or ‘what do you want to take the bead from?’
(ii) one or more noun-matching words are supplied, but more than one matching object could equally-plausibly (according to the parser’s disambiguation rules) make sense in context
→ e.g. ‘take bean’, leading to ‘which do you mean, the red bean or the green bean?’
These are situations where the parser assumes the player is referring to a single, specific object but it can’t find a single best match.
Conversely, if the parser is able to assume that any one or more of a number of objects would do, (what it calls ‘indefinite mode’) it prefers to make a choice- even if there are other unchosen objects which could equally plausibly (according to its disambiguation rules) make sense in context.
E.g. (in the presence of a red bean, a green bean, a yellow bean, a red marble and a red coin, all in a cup):
Lab
You can see a cup (in which are a red bean, a green bean, a yellow bean, a red marble and a red coin) here.
>take red
Which do you mean, the red bean, the red marble or the red coin?
but
>take a red
(the red bean)
Taken
Here, the use of ‘a red’ signals to the parser the same as ‘one red’, i.e. ‘choose any one thing matching the following word(s)’. The red bean is chosen over the other red objects for the same reason it is listed first in descriptions- in the I6 object tree it is the eldest child of the cup. After taking the red marble then reinserting it in the cup, the red marble is now the eldest child of the cup and will be chosen instead:
Lab
You can see a cup (in which are a red bean, a green bean, a yellow bean, a red marble and a red coin) here.
>take marble
Taken.
>put it in cup
You put the red marble into the cup.
>look
Lab
You can see a cup (in which are a red marble, a red bean, a green bean, a yellow bean and a red coin) here.
>take a red
(the red marble)
Taken.
Similarly:
Lab
You can see a cup (in which are a red bean, a green bean, a yellow bean, a red marble and a red coin) here.
>take two bean
red bean: Taken.
green bean: Taken.
However, this ‘object tree’ method for choosing from among matching objects is only the last resort, used only if they score equally in disambiguation: if we make one bean score more highly than the others, it will be chosen first:
Does the player mean taking the yellow bean: it is likely.
Lab
You can see a cup (in which are a red bean, a green bean, a yellow bean, a red marble and a red coin) here.
>take two bean
yellow bean: Taken.
red bean: Taken.
The way this works under the hood is that the parser makes a list (the match list) of every object that matches the command, then goes through the match list in descending score order, excluding any object that makes no sense in context (e.g. it will exclude something fixed in place from a Take action) building a second list (the multiple object list) until that contains the number of objects asked for (in this case two).