04 Mar, 2010, Scandum wrote in the 21st comment:
Votes: 0
You also have an hourglass, a universal screwdriver, and so the list of exceptions goes on.

Another advantage of baking in the articles that seems to be overlooked by most is that you don't have to set flags for when 'the' should be used, or when an article must be omitted. Like: You drop Belial's military sword. You attack the goblin king.

The stripping of articles under the hood is as minimal as adding articles, while the logic is more straight forward, then again, few people are gifted with the kind of objectivity that comes natural for me.
04 Mar, 2010, David Haley wrote in the 22nd comment:
Votes: 0
Scandum said:
As a side note to Haley, as far as I know Diku doesn't play guessing games as it doesn't try to remove or substitute articles. Feel free to quote said functions.

I said Dikuland, not Diku specifically. But feel free to look up "aoran" in SMAUG, to start with one. Or, feel free to note that often these things simply aren't handled at all.

In any case, you seem to have stated that your intention was to introduce comic relief and not discuss a solution, so …
I mean really, what are we supposed to think with sentences like this: "few people are gifted with the kind of objectivity that comes natural for me. "
Are we to take you seriously or is this just another round of haha comic relief?

You haven't actually given a solution: you've just waved your hands around saying you have one. So what is it?
04 Mar, 2010, Scandum wrote in the 23rd comment:
Votes: 0
David Haley said:
I said Dikuland, not Diku specifically. But feel free to look up "aoran" in SMAUG, to start with one. Or, feel free to note that often these things simply aren't handled at all.

I just looked it up the aoran() function, which adds an indefinite article, which is exactly the mess my suggested approach avoids.

Perhaps the entire concept is too far ahead of it's time, I mean, it is kind of daunting to store meta data in the short description by the simple inclusion of 'a', 'an', 'the', 'a pair of', or their omission in the case of a name, rather than having to set the data using separate flags.
04 Mar, 2010, David Haley wrote in the 24th comment:
Votes: 0
And then you have cases where objects become pluralized, so you get situations like "an arrows". Well, I'm not going to go out of my way any more to convince you that this problem isn't trivial, and that trivial solutions won't address it correctly.
04 Mar, 2010, Cratylus wrote in the 25th comment:
Votes: 0
David Haley said:
And then you have cases where objects become pluralized, so you get situations like "an arrows". Well, I'm not going to go out of my way any more to convince you that this problem isn't trivial, and that trivial solutions won't address it correctly.


Nice closed mind there, pal.

Just keep spreading that FUD about human languages being non-trivial to parse.

I'll be over here splitting the atom with the loch ness monster.

-Crat
http://lpmuds.net
04 Mar, 2010, Runter wrote in the 26th comment:
Votes: 0
I'd use a doubly linked pointer grid to solve this problem.
04 Mar, 2010, Lyanic wrote in the 27th comment:
Votes: 0
Cratylus said:
I'll be over here splitting the atom with the loch ness monster.

You tell that damn Loch Ness monster that he owes me about tree fiddy!
04 Mar, 2010, Cratylus wrote in the 28th comment:
Votes: 0
Runter said:
I'd use a doubly linked pointer grid to solve this problem.


So long as it's implemented strictly in telnet option subnegotiation. Plaintext grammar is so last-gen.
05 Mar, 2010, flumpy wrote in the 29th comment:
Votes: 0
I think I would approach these exceptions to the rule the same way the Pluralizer lib I'm using does, buy adding exception matchers to the algorithm or object.

That way as you come across them you can initially and then progressively account for them all.

I think that would be far better than chopping random beginnings off short descs tbh


Ps rofl you geys
05 Mar, 2010, Scandum wrote in the 30th comment:
Votes: 0
David Haley said:
And then you have cases where objects become pluralized, so you get situations like "an arrows". Well, I'm not going to go out of my way any more to convince you that this problem isn't trivial, and that trivial solutions won't address it correctly.

So after I point out that your Dikuland comment was baseless, you come up with another silly issue which even a 7 year old could rebuke, while your buddies attempt to belittle me.

I guess it's time for me to leave y'all to it.
05 Mar, 2010, Runter wrote in the 31st comment:
Votes: 0
Scandum said:
David Haley said:
And then you have cases where objects become pluralized, so you get situations like "an arrows". Well, I'm not going to go out of my way any more to convince you that this problem isn't trivial, and that trivial solutions won't address it correctly.

So after I point out that your Dikuland comment was baseless, you come up with another silly issue which even a 7 year old could rebuke, while your buddies attempt to belittle me.

I guess it's time for me to leave y'all to it.


We're more like frenemies.
05 Mar, 2010, Cratylus wrote in the 32nd comment:
Votes: 0
Scandum said:
… your buddies attempt to belittle me.

I guess it's time for me to leave y'all to it.


Ok, this will probably fall on deaf ears, but I'll say it anyway, in case for
a brief moment there is a gap in your defensiveness and a ray of sunlight
has a chance to peek through. Or a split atom, whatever you prefer.

When you open your participation with something like this:

Scandum said:
Sorry, but I'd say y'all got it wrong.


It makes you look really, really lame to then get emo about people
engaging you with equal competitive vigor.

Even if you lack an instinct for feeling this to be true, you should be
able to recognize that when you open with a competitive social
register, it is reasonable to expect that opening to be responded
to in kind.

Feel free to take your toys and leave the thread, but don't travel
under the misperception that people were mean to you out of the
blue…or even more ridiculously, to slurp on DH's ego.

-Crat
http://lpmuds.net
05 Mar, 2010, Lyanic wrote in the 33rd comment:
Votes: 0
Cratylus said:
…or even more ridiculously, to slurp on DH's ego.

Yes, that would be ridiculous. It's far too big for anyone to slurp… :tongue:
05 Mar, 2010, shasarak wrote in the 34th comment:
Votes: 0
Scandum said:
You also have an hourglass, a universal screwdriver, and so the list of exceptions goes on.

There is a surprising number of exceptions. A eucaplyptus tree, a euclidean geometry problem, a eugenically bred orc, a eulogy, a euphemism, a euphonium, a euphoric goblin, a euro, a european, a euthanasia clinic, a ewe, an HQ, a Ianto Jones look-alike, a ubiquitous goblin, a ugandan, a ukelele, a ukrainian, a unified force, a uniform, a unit of measurement, a united front, a u-turn, a uvula, an X-Wing Fighter, an Yttrium nugget, an Ytterbium nugget, an Ypres-bound tourist. That's just off the top of my head.
:smile:

And that's before you get into historical variations (a little as a few decades ago it wouldn't have been wildly incorrect to say "an hotel") and dialects - a working class class gentleman from London might say "that's an 'orrible noise", and that would sound a lot more natural than adding an extra glottal stop.
05 Mar, 2010, Cratylus wrote in the 35th comment:
Votes: 0
shasarak said:
There is a surprising number of exceptions. A eucaplyptus tree, a euclidean geometry problem, a eugenically bred orc, a …


An 8-ball.

-Crat
05 Mar, 2010, KaVir wrote in the 36th comment:
Votes: 0
Quote
A eucaplyptus tree, a euclidean geometry problem, a eugenically bred orc, a eulogy, a euphemism, a euphonium, a euphoric goblin, a euro, a european, a euthanasia clinic,

So "eu*", then.

Yes, there are plenty of theoretical exceptions. But in practice, in a real mud, I've not found it to be a problem - as I said before, in more than eight years of development I've encountered only one exception: a player reported "an unicorn horn" as being grammatically incorrect, so I fixed it.

Personally I consider the price to be more than worthwhile, as it allows me to have dynamic short descriptions for objects, integrate weapon names into the combat messages, make it clear to players what they're targeting, and so on. My approach certainly isn't perfect, but it's simple and it works, and I feel it lets me add a lot of flavour to my mud.

I often find myself answering questions like:

Newbie: Why is all my equipment wet?
Me: Because it's raining.
Newbie: Oh, cool!

New players notice little details like that. Generated dynamic short descriptions are extremely simple from a development perspective (as opposed to full-length generated dynamic descriptions for rooms, creatures, etc), but they produce cool-looking results that are immediately obvious to the players, and can make the game world feel more interactive.

Small effort for large return = win.
05 Mar, 2010, Tyche wrote in the 37th comment:
Votes: 0
a_an.rb
$v_exc = %r{^(#{IO.read("vowel_exceptions").split("\n").join("|")})}io
$c_exc = %r{^(#{IO.read("consonant_exceptions").split("\n").join("|")})}io
$def_rule = %r{^(a|e|i|o|u)}

def find_article(word)
if (word =~ $def_rule && !(word =~ $v_exc)) || word =~ $c_exc
"an"
else
"a"
end
end

a = %w{test cow hour union solid aardvark one-sided honourable onion euphoric u s x MIT AAA f i }

a.each do |b|
puts find_article(b) + " " + b
end


$ ruby a_an.rb
a test
a cow
an hour
a union
a solid
an aardvark
a one-sided
a honourable
an onion
a euphoric
a u
an s
an x
an MIT
a AAA
an f
an i


vowel_exceptions
AAA
EUAN
EUBANK
EUCALYPTI
EUCALYPTUS
EUCHARIST
EUCHRE
EUCHRED
EUCLEA
EUCLID
EUDOCIA
EUDORA
EUDOSIA
EUDOXIA
EUDY
EUGEN
EULA
EULICH
EULOG
EUNICE
EUPHEMI
EUPHOR
EUPHRATES
EURASIA
EURECA
EUREKA
EUREST
EURO
EURY
EUSEBIO
EUSTAC
EUSTICE
EUSTIS
EUTHANASIA
EUTHANIZE
EUTSEY
EUTSLER
EWALD
EWALT
EWAN
EWART
EWBAL
EWBANK
EWE
EWELL
EWEN
EWER
EWERT
EWES
EWIG
EWING
EWOLDT
EWTON
EWY
ONCE
ONE
OUI
OUIMET
U$
UARCO
UART
UBER
UBIQUIT
UDALE
UDALL
UDY
UEBERROTH
UEDA
UEKI
UENO
UGANDA
UGOLIN
UGRIC
UKASE
UKRAINE
UKULELE
ULA
ULAM
ULAND
ULI
ULIN
ULITSA
ULLENBERG
ULLYSES
ULUNDI
ULYSSES
UMASS
UMETSU
UNABOM
UNANIM
UNESCO
UNI
UNOCAL
UNOSOM
UNUM
URAL
URAM
URANIUM
URANUS
URE$
UREA
UREMIA
URETH
UREY
URI
URIAN
URIARTE
URIAS
URIBE
URIC
URIE
URIEGAS
URIN
URIOSTE
UROKINASE
UROLOG
URUGUAY
URY
USA
USABLE
USAFE
USAGE
USAID
USAIR
USAMERIBANCS
USBANCORP
USE
USINES
USING
USINOR
USTRUST
USUAL
USURP
USURY
UTAH
UTAMARO
UTECH
UTENSILS
UTERINE
UTERO
UTERUS
UTHER
UTICA
UTILI
UTOPIA
UVA
UWE
UYS


consonant_exceptions
CABOK
F$
FM
H$
HBOX
HCES
HEIR
HENRIQUE
HERB
HFDF
HGH
HIAA
HIPOLITO
HOMAGE
HONEST
HONOR
HOUR
L$
LAPD
LCS
LP
LPN
LS
LSD
M$
MBANK
MCORP
MFUME
MGM
MH
MHM
MIT
MPEG
MPG
MPH
MTEL
N$
NDAU
NG
NGEMA
NGOR
NIC
NJT
NPR
NTH
NVHOME
NVRYAN
R$
RB
RPF
RPM
RRROT
RZASA
RZEPKA
S$
SBF
SDN
SH
STDS
SUU
X$
XAVIERA
XERS
XSCRIBE
XTRA
YBANEZ
YBARBO
YBARRA
YGLESIAS
YNIGUEZ
YPSILANTI
YQUEM
YSLETA
YTTRIUM
YVES
YVETTE
YVONNE
YZAGUIRRE


Data built from Carnegie Mellon University pronunciation dictionary
05 Mar, 2010, flumpy wrote in the 38th comment:
Votes: 0
Do ruby regex match upper and lower case by default? I'm only asking cause I plugged your code into groovy and had to .toUpperCase the word for it to match…
05 Mar, 2010, Tyche wrote in the 39th comment:
Votes: 0
flumpy said:
Do ruby regex match upper and lower case by default? I'm only asking cause I plugged your code into groovy and had to .toUpperCase the word for it to match…


I used a case insensitive flag on the regex.

BTW, here's where I got the dictionary…
https://cmusphinx.svn.sourceforge.net/sv...

The format is like this…
ABATING  AH0 B EY1 T IH0 NG
ABBA AE1 B AH0
ABBADO AH0 B AA1 D OW0
ABBAS AH0 B AA1 S
ABBASI AA0 B AA1 S IY0
ABBATE AA1 B EY0 T


I used a small program to initially populate my lists of exceptions based on the sounds.
File.open('cmudict.0.6d') { |f|
f.each_line { |l|
# vowel-exceptions
if (l =~ /^(A|E|I|O|U)/) && (l =~ /^([A-Z]+) (?!(AA|AE|AH|AO|AW|AY|EH|ER|EY|IH|IY|OW|OY|UH|UW)).*/)
# consonant-exceptions
# if !(l =~ /^(A|E|I|O|U)/) && (l =~ /^([A-Z]+) (AA|AE|AH|AO|AW|AY|EH|ER|EY|IH|IY|OW|OY|UH|UW).*/)
# uni
# if l =~ /^([A-Z]+)/ && l =~ /^(U.*)\s/
puts $1
end
}
}


Some editting was done to the result to collapse similar entries… It matches on begins with pattern. Some entries I append with a $ to provide an exact match, letters like 's' and 'x'.
05 Mar, 2010, flumpy wrote in the 40th comment:
Votes: 0
nice work, tyche! useful :)
20.0/56