
www.Usenet.com
| <-- __Chronological__ --> | <-- __Thread__ --> |
"Arthur J. O'Dwyer" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> On Fri, 21 Nov 2003, Lizerd wrote:
> >
> > "Emma Teigen Vartdal" <[EMAIL PROTECTED]> wrote...
> > > Gerry Quinn wrote:
> > >
> > > > Ray Dillinger <[EMAIL PROTECTED]> wrote:
> > > >>The a/an thing with singulars is easy, in English. Just look at the
> > > >>first character. If it's a pure vowel (a, e, i, o, or u) use "an".
> > > >>If it's a consonant, use "a".
> > > >
> > > > Not that easy, what about 'h': "a horse" vs. "an honour". And I suspect
> > > > there are a few that pedants could argue for days about...
> > >
> > > ged off that 'orse!
>
> Lazy Roguelike Programming Tip #427:
> Don't bother coding special cases for 'H'. Just tweak
> your game data files until they work properly. For
> instance, make all 'H' words take 'an' by default, and
> for those 'H' words that do take an 'a', just make your
> game engine speak in Cockney:
Lazy Roguelike Programming Tip #428:
If you have your gram_get_indefinite_article function, there is no
reason why one can't add:
const char *
gram_get_indefinite_article(const char *name)
{
If name is "honour"
return "an ";
If name starts with "hour"
return "an ";
If name[0] is a u
Look for "utility" type words and return "a "
If name starts with vowel
return "an ";
If name starts with a consonent
return "a ";
}
A cascading series of ifs is strictly less work than adding "a " and
"an " to your entire object database. You can get 90% of the cases
working, and clean up the others as they are reported.
> > > Here's a thought...
> > Put a/an in the object description...
> > or "a cat/ several cats"
> >
> > I.E.: Chr sees= "You see on the hill " & Object(12,1) & "."
> > Object(12,1)="a horse"
> > Object(12,2)="several horses"
> >
> > That should solve the a/an issue as well as the singular/plural problem.
>
> Yes, but at the expense of an incredible amount of programmer
> effort, which the OPs were trying to minimize; and also a large
> amount of disk space consisting only of the letters "several"
> repeated over and over. (Compression will help, of course, but
> then the engine is nowhere near as simple, and the game won't be
> as "variant-izable" if you need a special data-file editor.)
Agreed. Someone has to do that extra data entry. Automate all data
entry except the interesting stuff. Deal with special cases as
special cases.
- Jeff Lait
(POWDER: http://www.zincland.com/powder)
| <-- __Chronological__ --> | <-- __Thread__ --> |