You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Henri Yandell <ba...@generationjava.com> on 2002/12/11 23:16:00 UTC

[codec] Re: DoubleMetaphone

Definitely. I've got a bunch of codec things that built up while I was
away [I've been submitting patches when they've been sitting around for a
bit]. I'll add this to the list and try to push them through. Hopefully as
codec gains submissions, it can gain a bit of life.

Hen


On Wed, 11 Dec 2002, Kyle R . Burton wrote:

> I just came across the Codec commons project (we're already using
> HttpClient where I work) while looking for a Base64 encoder/decoder.
>
> While looking through the CVSweb, I noticed the Metaphone and SOUNDEX
> implementations...I've done implementations of DoubleMetaphone (based on
> public-domain code - I had permission from Ed Parrish to re-implement his
> code in Java), and Nysiis and would like to offer them to this project.
>
> You can find them here:
>
>   http://www.bgw.org/projects/java/phonetic/
>   http://www.bgw.org/projects/java/phonetic/DoubleMetaphone.java
>   http://www.bgw.org/projects/java/phonetic/Nysiis.java
>
> I'm not currently on commons-dev, so please CC me directly with any
> discussion.
>
> Thank you for your time,
> Kyle R. Burton
>
> --
>
> ------------------------------------------------------------------------------
> Wisdom and Compassion are inseparable.
>         -- Christmas Humphreys
> mortis@voicenet.com                            http://www.voicenet.com/~mortis
> ------------------------------------------------------------------------------
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [codec] Re: DoubleMetaphone

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
formatting looks close enough to me :)

(whoever commits should probably go through the code and correct any small 
problems anyway.)

since this is a (reasonably) significant donation of code for which 
versions with other copyright already exist, we should probably check with 
the foundation to make sure that all the legal t's are crossed and the i's 
dotted (so to speak) be committing anything, shouldn't we?

- robert

On Thursday, December 12, 2002, at 02:55 AM, Kyle R . Burton wrote:

> One last annoyance...I put the new classes in a sub-directory of the
> old ones:
>
>   http://www.bgw.org/projects/java/phonetic/jakarta-commons-codec/
>
> They already have changed package names for org.apache.commons.codec.
>
>
> Thanks again,
> Kyle R. Burton
>
> --
>
> ------------------------------------------------------------------------------
> Wisdom and Compassion are inseparable.
>         -- Christmas Humphreys
> mortis@voicenet.com                            
> http://www.voicenet.com/~mortis
> ------------------------------------------------------------------------------
>
> --
> To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.
> org>
> For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.
> org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [codec] Re: DoubleMetaphone

Posted by "Kyle R . Burton" <mo...@voicenet.com>.
One last annoyance...I put the new classes in a sub-directory of the
old ones:

  http://www.bgw.org/projects/java/phonetic/jakarta-commons-codec/

They already have changed package names for org.apache.commons.codec.


Thanks again,
Kyle R. Burton

-- 

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

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [codec] Re: DoubleMetaphone

Posted by "Kyle R . Burton" <mo...@voicenet.com>.
> Straight off the top of my head, just match the format of Metaphone in any
> obvious ways. Copy the license declaration, javadoc as much as it does,
> don't do any blatant things it doesn't do code standard wise.

- Copied license: check
- Added Javadoc comments: check

> Obeying the Sun code standard is usually the easy thing to do.
>
> There's probably a web-page to point you to, but I have not got it to hand
> atm.

I'm not 100% familiar with the Sun code standard...but I've made the two
modules as close to Metaphone.java as I can tell in format.


One other thing - I modified the two modules to implement the Encoder 
interface.  As I was implementing an equivalent for isMetaphoneEqual() in
DoubleMetaphone and Nysiis, I got the feeling that it might be a method
declared in the Encoder interface.


Maybe a method like:

  public boolean isEncodeEqual( String s1, String s2 );

Then these encoders would all be interchangeable at the level of the Encoder 
interface that you've already defined.  Though the EncoderComparator does
serve a similar purpose now that I'm looking at it's implementation.


I originally created these two classes so they could be used as Oracle Java 
stored procedures in the database.  To be supported under Oracle, you
have to have a static method that can be invoked by the database -- instead
of having to write one to wrap the encode() calls in these two classes, I 
just added another method to each: sencode(), to indicate a 'static' encode.
Then they can be invoked directly from Oracle as Java stored procedures.

Just food for thought.

I'm no Java guru - can a static method be declared in an interface has
having to be implemented in an implementing class?


Best regards,

Kyle R. Burton

-- 

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

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [codec] Re: DoubleMetaphone

Posted by Henri Yandell <ba...@generationjava.com>.
Straight off the top of my head, just match the format of Metaphone in any
obvious ways. Copy the license declaration, javadoc as much as it does,
don't do any blatant things it doesn't do code standard wise.

Obeying the Sun code standard is usually the easy thing to do.

There's probably a webpage to point you to, but I haven't got it to hand
atm.

Hen

On Wed, 11 Dec 2002, Kyle R . Burton wrote:

> > Definitely. I've got a bunch of codec things that built up while I was
> > away [I've been submitting patches when they've been sitting around for a
> > bit]. I'll add this to the list and try to push them through. Hopefully as
> > codec gains submissions, it can gain a bit of life.
> >
> > Hen
>
> Great!  I'm glad these contributions will be of use.  Is there anything
> I should do to prepare the code?  Javadoc standards?  Code formatting
> standards?  Licensing declaration?  Whatever?
>
> I'm not looking for check-in privileges, just to contribute these modules.
>
>
> Thanks again,
>
> Kyle
>
> > On Wed, 11 Dec 2002, Kyle R . Burton wrote:
> >
> > > I just came across the Codec commons project (we're already using
> > > HttpClient where I work) while looking for a Base64 encoder/decoder.
> > >
> > > While looking through the CVSweb, I noticed the Metaphone and SOUNDEX
> > > implementations...I've done implementations of DoubleMetaphone (based on
> > > public-domain code - I had permission from Ed Parrish to re-implement his
> > > code in Java), and Nysiis and would like to offer them to this project.
> > >
> > > You can find them here:
> > >
> > >   http://www.bgw.org/projects/java/phonetic/
> > >   http://www.bgw.org/projects/java/phonetic/DoubleMetaphone.java
> > >   http://www.bgw.org/projects/java/phonetic/Nysiis.java
> > >
> > > I'm not currently on commons-dev, so please CC me directly with any
> > > discussion.
> > >
> > > Thank you for your time,
> > > Kyle R. Burton
> > >
> > > --
> > >
> > > ------------------------------------------------------------------------------
> > > Wisdom and Compassion are inseparable.
> > >         -- Christmas Humphreys
> > > mortis@voicenet.com                            http://www.voicenet.com/~mortis
> > > ------------------------------------------------------------------------------
> > >
> > > --
> > > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > > For additional commands, e-mail: <ma...@jakarta.apache.org>
> > >
> > >
> >
>
> --
>
> ------------------------------------------------------------------------------
> Wisdom and Compassion are inseparable.
>         -- Christmas Humphreys
> mortis@voicenet.com                            http://www.voicenet.com/~mortis
> ------------------------------------------------------------------------------
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [codec] Re: DoubleMetaphone

Posted by "Kyle R . Burton" <mo...@voicenet.com>.
> Definitely. I've got a bunch of codec things that built up while I was
> away [I've been submitting patches when they've been sitting around for a
> bit]. I'll add this to the list and try to push them through. Hopefully as
> codec gains submissions, it can gain a bit of life.
> 
> Hen

Great!  I'm glad these contributions will be of use.  Is there anything 
I should do to prepare the code?  Javadoc standards?  Code formatting
standards?  Licensing declaration?  Whatever?

I'm not looking for check-in privileges, just to contribute these modules.


Thanks again,

Kyle

> On Wed, 11 Dec 2002, Kyle R . Burton wrote:
> 
> > I just came across the Codec commons project (we're already using
> > HttpClient where I work) while looking for a Base64 encoder/decoder.
> >
> > While looking through the CVSweb, I noticed the Metaphone and SOUNDEX
> > implementations...I've done implementations of DoubleMetaphone (based on
> > public-domain code - I had permission from Ed Parrish to re-implement his
> > code in Java), and Nysiis and would like to offer them to this project.
> >
> > You can find them here:
> >
> >   http://www.bgw.org/projects/java/phonetic/
> >   http://www.bgw.org/projects/java/phonetic/DoubleMetaphone.java
> >   http://www.bgw.org/projects/java/phonetic/Nysiis.java
> >
> > I'm not currently on commons-dev, so please CC me directly with any
> > discussion.
> >
> > Thank you for your time,
> > Kyle R. Burton
> >
> > --
> >
> > ------------------------------------------------------------------------------
> > Wisdom and Compassion are inseparable.
> >         -- Christmas Humphreys
> > mortis@voicenet.com                            http://www.voicenet.com/~mortis
> > ------------------------------------------------------------------------------
> >
> > --
> > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
> >
> >
> 

-- 

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

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>