I have a problem. Now that Adventuron has multi-word input, I am trying to write generic command handlers for each action so that I only have to write specific overrides in the on_command
section. In order to make things properly generic, I need to be able to do the following:
(a)
Print things with or without an indefinite article, i.e. ‘a’ or ‘an’ for singular common nouns, ‘some’ for plural common nouns or nothing for proper nouns. For example, ‘You can see a present, an umbrella, some chestnuts and Santa Claus’.
(b)
Print things with or without a definite article, i.e. ‘the’ for common nouns or nothing for proper nouns. For example, ‘You cut the string and Jack the Ripper’.
(c)
Print the object description, rather than the noun entered. (This may be a substitute for (a).)
(d)
Print a gender-specific pronoun, i.e. ‘he’, ‘she’, ‘it’ or ‘them’; ‘him’, ‘her’, ‘it’ or ‘them’; ‘his’, ‘hers’, ‘its’ or ‘theirs’; and so on.
Is it possible to do this?