commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kyle R . Burton" <mor...@voicenet.com>
Subject Re: [codec] Re: DoubleMetaphone
Date Mon, 03 Feb 2003 16:26:21 GMT
> DoubleMetaphone and Nysiis have been committed.  
> 
> Kyle, thanks for the code.  

You're more then welcome.  I'm just happy to give something back.

> Here's a numbered list...
> 
> 1. Thread Safety - All of the other encoders are thread safe in that
> multiple threads can call encode on a single instance of the class.  
> 
> Since we intend codec to be in wide use, it might make sense to move all
> implementations towards extreme thread safety.  I don't think that Soundex
> is going to be used in the Arianne Sky Rocket or life support, but something
> like Hex or Base64 could be.

Both of these modules privde a static method, sencode(), that creates a
local instance of the encoder, and then invokes the encode() method on it.  
These static functions are thread safe.

It should be easy enough to swap the implementations of these functions if
that is what is desired.

I think this would be preferrable to making the encode methods synchronized.

In my opinion, the use of member vairables makes the code easier to 
understand, and it additionaly means that the code doesn't have to pass
quite as many variables across the stack when invoking its private internal
methods.

If there are recommendations, or standards for the thread-safe design you're
looking for, I'd be very willing to try to get these modules to fit them.

> 2. DoubleMetaphone doesn't play nice with "maurice" and "bryce" - I've put a
> bug into Bugzilla for this.

Unfortunatly I can't comment on the corectness of the implementation.  I'll
see if I can re-compare it to other implementaitons to find any dfferences.


Thanks again,
Kyle R. Burton

-- 

------------------------------------------------------------------------------
Wisdom and Compassion are inseparable.
        -- Christmas Humphreys
mortis@voicenet.com                            http://www.voicenet.com/~mortis
------------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message