Issue 22 in sorrows-mudlib: Allow for phrasal verbs on command names

0 views
Skip to first unread message

sorrows...@googlecode.com

unread,
Dec 22, 2010, 6:12:12 PM12/22/10
to sorrows-mud...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 22 by hello.jay.araujo: Allow for phrasal verbs on command names
http://code.google.com/p/sorrows-mudlib/issues/detail?id=22


> pickup chest

User jay sees message: You pickup chest

Other user sees message: Jay pickups chest

Ideal: Jay picks up a chest


sorrows...@googlecode.com

unread,
Dec 22, 2010, 7:46:14 PM12/22/10
to sorrows-mud...@googlegroups.com

Comment #1 on issue 22 by hello.jay.araujo: Allow for phrasal verbs on
command names
http://code.google.com/p/sorrows-mudlib/issues/detail?id=22

## Here's some related code from BogBoa:


def article(noun):
"""Return 'a' or 'an' depending on subject."""

if not noun:
return ''

nl = noun.lower()

if nl.startswith('uni'):
art = 'a'
elif nl.startswith('one'):
art = 'a'
elif nl.startswith('use'):
art = 'a'
elif nl.startswith('hon'):
art = 'a'
elif nl[0] in _VOWELS:
art = 'an'
else:
art = 'a'

return art

## and I expanded it with this:

def qtfy(obj):

name = obj.name.lower()

if obj.countable:
return '%s %s' % (article(name), name)
else:
return 'some %s' % name

sorrows...@googlecode.com

unread,
Dec 22, 2010, 8:22:44 PM12/22/10
to sorrows-mud...@googlegroups.com

Comment #2 on issue 22 by richard.m.tew: Allow for phrasal verbs on command
names
http://code.google.com/p/sorrows-mudlib/issues/detail?id=22

Ah, right, I never did article support. This seems like something that
test driven development would be ideal for.

sorrows...@googlecode.com

unread,
Dec 22, 2010, 8:26:46 PM12/22/10
to sorrows-mud...@googlegroups.com
Updates:
Status: Accepted

Comment #3 on issue 22 by richard.m.tew: Allow for phrasal verbs on command
names
http://code.google.com/p/sorrows-mudlib/issues/detail?id=22

(No comment was entered for this change.)

sorrows...@googlecode.com

unread,
Dec 23, 2010, 8:36:26 AM12/23/10
to sorrows-mud...@googlegroups.com
Updates:
Owner: richard.m.tew

Comment #4 on issue 22 by richard.m.tew: Allow for phrasal verbs on command
names
http://code.google.com/p/sorrows-mudlib/issues/detail?id=22

I hope there's a library out there which takes care of this sort of thing,
which can either be used in-situ, or wrapped. Here's one that might be
worth looking at.

http://pypi.python.org/pypi/inflect/0.2.1


sorrows...@googlecode.com

unread,
Feb 5, 2011, 8:29:28 AM2/5/11
to sorrows-mud...@googlegroups.com
Updates:
Status: Fixed

Comment #5 on issue 22 by richard.m.tew: Allow for phrasal verbs on command
names
http://code.google.com/p/sorrows-mudlib/issues/detail?id=22

Added simplistic article support.
http://code.google.com/p/sorrows-mudlib/source/detail?r=200

sorrows...@googlecode.com

unread,
Feb 5, 2011, 8:39:31 AM2/5/11
to sorrows-mud...@googlegroups.com

Comment #6 on issue 22 by richard.m.tew: Allow for phrasal verbs on command
names
http://code.google.com/p/sorrows-mudlib/issues/detail?id=22

This should be sufficient, but there are gaps. Taking "pants" will be seen
by a bystander as "X takes a pants" and by the actor as "You take the
pants". The correct fix here would to add the concept of measure words as
descriptive adjectives so that any objects of type pants would inherit and
use the "pair" measure word. So taking "pants" will be seen by a bystander
as "X takes a pair of pants" and by the actor as "You take the pair of
pants".

Reply all
Reply to author
Forward
0 new messages