Re: [PHP] catching plurals

2002-06-11 Thread Dan Hardiker

 I'm trying to write a function to catch and remove plurals from a
 search feature, can anyone suggest how I can efficiently remove 'ies'
 and 's' from the right hand end of each word within an array?

Your best bet is to use a phonetic search (for speed) looking up against a
dictionary file although there are speed impacts.

-- 
Dan Hardiker [[EMAIL PROTECTED]]
ADAM Software  Systems Engineer
First Creative Ltd



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] catching plurals

2002-06-11 Thread Miguel Cruz

On Tue, 11 Jun 2002, Zac Hillier wrote:
 I'm trying to write a function to catch and remove plurals from a search
 feature, can anyone suggest how I can efficiently remove 'ies' and 's'
 from the right hand end of each word within an array?

You are wasting your time (and preparing to really annoy your users)  
trying to do this with any algorithm. Too many singular words end with
's'. Are you going to change this to thi and lens to len? Sounds 
really handy.

The only way you're going to get it to work is if you can find a 
dictionary file that contains words and their plurals.

miguel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php