[squeak-dev] SoundsLike package released on SqueakSource

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] SoundsLike package released on SqueakSource

Ron Teitelbaum

Hello all,

 

I have released a new package on SqueakSource that contains SoundEx and DoubleMetaphone. 

 

http://www.squeaksource.com/SoundsLike.html

 

This package adds soundsLike: to string

 

‘titlebalm’ soundsLike: ‘teitelbaum’

 

You can also get the phenoticStringsFor: a word to store in a database for later queries. 

 

PhoneticStringComparator defaultClass “SoundEx” new phoneticStringsFor: 'titlebalm' #('T341')

 

DoubleMetaphoneStringComparator new phoneticStringsFor: 'teitelbaum' #('TTLPM' 'TTLPM')

 

Let me know if you have any questions.

 

Regards,

 

Ron Teitelbaum

 

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Rob Rothwell
Sent: Friday, January 16, 2009 6:35 AM
To: [hidden email]
Cc: A friendly place to get answers to even the most basic questionsaboutSqueak.
Subject: Re: [Newbies] SoundEx algorithm

 

No rush...I am working on a custom recipe program for my wife and wanted to use it to search ingredients and still find something that was misspelled!

Thanks,

Rob

On Thu, Jan 15, 2009 at 10:10 PM, Ron Teitelbaum <[hidden email]> wrote:

I did one but didn't release it anywhere.  I did metaphone and double metaphone.

 

Maybe I can dig it up.  When did you need it?

 

Ron Teitelbaum

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Rob Rothwell
Sent: Monday, January 12, 2009 4:39 PM
To: Beginners Sqeak
Subject: [Newbies] SoundEx algorithm

 

Does anyone know of a SoundEx algorithm in Squeak before I go write one myself?

Never hurts to ask!

Rob

 



Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Re: SoundsLike package released on SqueakSource

Rob Rothwell
Thanks!

Rob

On Fri, Jan 16, 2009 at 10:02 AM, Ron Teitelbaum <[hidden email]> wrote:

Hello all,

 

I have released a new package on SqueakSource that contains SoundEx and DoubleMetaphone. 

 

http://www.squeaksource.com/SoundsLike.html

 

This package adds soundsLike: to string

 

'titlebalm' soundsLike: 'teitelbaum'

 

You can also get the phenoticStringsFor: a word to store in a database for later queries. 

 

PhoneticStringComparator defaultClass "SoundEx" new phoneticStringsFor: 'titlebalm' #('T341')

 

DoubleMetaphoneStringComparator new phoneticStringsFor: 'teitelbaum' #('TTLPM' 'TTLPM')

 

Let me know if you have any questions.

 

Regards,

 

Ron Teitelbaum

 

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Rob Rothwell
Sent: Friday, January 16, 2009 6:35 AM
To: [hidden email]
Cc: A friendly place to get answers to even the most basic questionsaboutSqueak.
Subject: Re: [Newbies] SoundEx algorithm

 

No rush...I am working on a custom recipe program for my wife and wanted to use it to search ingredients and still find something that was misspelled!

Thanks,

Rob

On Thu, Jan 15, 2009 at 10:10 PM, Ron Teitelbaum <[hidden email]> wrote:

I did one but didn't release it anywhere.  I did metaphone and double metaphone.

 

Maybe I can dig it up.  When did you need it?

 

Ron Teitelbaum

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Rob Rothwell
Sent: Monday, January 12, 2009 4:39 PM
To: Beginners Sqeak
Subject: [Newbies] SoundEx algorithm

 

Does anyone know of a SoundEx algorithm in Squeak before I go write one myself?

Never hurts to ask!

Rob

 




Reply | Threaded
Open this post in threaded view
|

[squeak-dev] RE: SoundsLike package released on SqueakSource

Ron Teitelbaum

You are welcome.  I hope you find it useful.

 

Ron

 


From: Rob Rothwell [mailto:[hidden email]]
Sent: Friday, January 16, 2009 11:15 AM
To: [hidden email]
Cc: A friendly place to get answers to even the most basic questionsabout Squeak.; [hidden email]; The general-purpose Squeak developers list
Subject: Re: SoundsLike package released on SqueakSource

 

Thanks!

Rob

On Fri, Jan 16, 2009 at 10:02 AM, Ron Teitelbaum <[hidden email]> wrote:

Hello all,

 

I have released a new package on SqueakSource that contains SoundEx and DoubleMetaphone. 

 

http://www.squeaksource.com/SoundsLike.html

 

This package adds soundsLike: to string

 

'titlebalm' soundsLike: 'teitelbaum'

 

You can also get the phenoticStringsFor: a word to store in a database for later queries. 

 

PhoneticStringComparator defaultClass "SoundEx" new phoneticStringsFor: 'titlebalm' #('T341')

 

DoubleMetaphoneStringComparator new phoneticStringsFor: 'teitelbaum' #('TTLPM' 'TTLPM')

 

Let me know if you have any questions.

 

Regards,

 

Ron Teitelbaum

 

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Rob Rothwell
Sent: Friday, January 16, 2009 6:35 AM
To: [hidden email]
Cc: A friendly place to get answers to even the most basic questionsaboutSqueak.
Subject: Re: [Newbies] SoundEx algorithm

 

No rush...I am working on a custom recipe program for my wife and wanted to use it to search ingredients and still find something that was misspelled!

Thanks,

Rob

On Thu, Jan 15, 2009 at 10:10 PM, Ron Teitelbaum <[hidden email]> wrote:

I did one but didn't release it anywhere.  I did metaphone and double metaphone.

 

Maybe I can dig it up.  When did you need it?

 

Ron Teitelbaum

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Rob Rothwell
Sent: Monday, January 12, 2009 4:39 PM
To: Beginners Sqeak
Subject: [Newbies] SoundEx algorithm

 

Does anyone know of a SoundEx algorithm in Squeak before I go write one myself?

Never hurts to ask!

Rob

 

 



Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] SoundsLike package released on SqueakSource

Ian Trudel-2
In reply to this post by Ron Teitelbaum
Sounds great, Ron! Has SoundsLike only English phonetics or it is
possible to define and use phonetics from other languages? Let's say,
multilingual. :)

Ian

2009/1/16 Ron Teitelbaum <[hidden email]>:

> Hello all,
>
>
>
> I have released a new package on SqueakSource that contains SoundEx and
> DoubleMetaphone.
>
>
>
> http://www.squeaksource.com/SoundsLike.html
>
>
>
> This package adds soundsLike: to string
>
>
>
> 'titlebalm' soundsLike: 'teitelbaum'
>
>
>
> You can also get the phenoticStringsFor: a word to store in a database for
> later queries.
>
>
>
> PhoneticStringComparator defaultClass "SoundEx" new phoneticStringsFor:
> 'titlebalm' #('T341')
>
>
>
> DoubleMetaphoneStringComparator new phoneticStringsFor: 'teitelbaum'
> #('TTLPM' 'TTLPM')
>
>
>
> Let me know if you have any questions.
>
>
>
> Regards,
>
>
>
> Ron Teitelbaum
>
>
>
>
>
> ________________________________
>
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Rob
> Rothwell
> Sent: Friday, January 16, 2009 6:35 AM
> To: [hidden email]
> Cc: A friendly place to get answers to even the most basic
> questionsaboutSqueak.
> Subject: Re: [Newbies] SoundEx algorithm
>
>
>
> No rush...I am working on a custom recipe program for my wife and wanted to
> use it to search ingredients and still find something that was misspelled!
>
> Thanks,
>
> Rob
>
> On Thu, Jan 15, 2009 at 10:10 PM, Ron Teitelbaum <[hidden email]> wrote:
>
> I did one but didn't release it anywhere.  I did metaphone and double
> metaphone.
>
>
>
> Maybe I can dig it up.  When did you need it?
>
>
>
> Ron Teitelbaum
>
>
>
> ________________________________
>
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Rob
> Rothwell
> Sent: Monday, January 12, 2009 4:39 PM
> To: Beginners Sqeak
> Subject: [Newbies] SoundEx algorithm
>
>
>
> Does anyone know of a SoundEx algorithm in Squeak before I go write one
> myself?
>
> Never hurts to ask!
>
> Rob
>
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

RE: [squeak-dev] SoundsLike package released on SqueakSource

Ron Teitelbaum
Hi Ian,

This is from WikiPedia: http://en.wikipedia.org/wiki/Double_Metaphone 

Use the Double Metaphone if you are interested in other languages.

The Double Metaphone search algorithm is a phonetic algorithm written by
Lawrence Philips and is the second generation of his Metaphone algorithm.
Its implementation was described in the June 2000 issue of C/C++ Users
Journal.

It is called "Double" because it can return both a primary and a secondary
code for a string; this accounts for some ambiguous cases as well as for
multiple variants of surnames with common ancestry. For example, encoding
the name "Smith" yields a primary code of SM0 and a secondary code of XMT,
while the name "Schmidt" yields a primary code of XMT and a secondary code
of SMT--both have XMT in common.

Double Metaphone tries to account for myriad irregularities in English of
Slavic, Germanic, Celtic, Greek, French, Italian, Spanish, Chinese, and
other origin. Thus it uses a much more complex ruleset for coding than its
predecessor; for example, it tests for approximately 100 different contexts
of the use of the letter C alone. In the introduction to his original
journal article, Mr. Philips defended this complexity.

Hope that helps!

Ron Teitelbaum

> -----Original Message-----
> From: Ian Trudel [mailto:[hidden email]]
> Sent: Friday, January 16, 2009 11:29 AM
> To: [hidden email]; The general-purpose Squeak developers list
> Subject: Re: [squeak-dev] SoundsLike package released on SqueakSource
>
> Sounds great, Ron! Has SoundsLike only English phonetics or it is
> possible to define and use phonetics from other languages? Let's say,
> multilingual. :)
>
> Ian
>
> 2009/1/16 Ron Teitelbaum <[hidden email]>:
> > Hello all,
> >
> >
> >
> > I have released a new package on SqueakSource that contains SoundEx and
> > DoubleMetaphone.
> >
> >
> >
> > http://www.squeaksource.com/SoundsLike.html
> >
> >
> >
> > This package adds soundsLike: to string
> >
> >
> >
> > 'titlebalm' soundsLike: 'teitelbaum'
> >
> >
> >
> > You can also get the phenoticStringsFor: a word to store in a database
> for
> > later queries.
> >
> >
> >
> > PhoneticStringComparator defaultClass "SoundEx" new phoneticStringsFor:
> > 'titlebalm' #('T341')
> >
> >
> >
> > DoubleMetaphoneStringComparator new phoneticStringsFor: 'teitelbaum'
> > #('TTLPM' 'TTLPM')
> >
> >
> >
> > Let me know if you have any questions.
> >
> >
> >
> > Regards,
> >
> >
> >
> > Ron Teitelbaum
> >
> >
> >
> >
> >
> > ________________________________
> >
> > From: [hidden email]
> > [mailto:[hidden email]] On Behalf Of Rob
> > Rothwell
> > Sent: Friday, January 16, 2009 6:35 AM
> > To: [hidden email]
> > Cc: A friendly place to get answers to even the most basic
> > questionsaboutSqueak.
> > Subject: Re: [Newbies] SoundEx algorithm
> >
> >
> >
> > No rush...I am working on a custom recipe program for my wife and wanted
> to
> > use it to search ingredients and still find something that was
> misspelled!
> >
> > Thanks,
> >
> > Rob
> >
> > On Thu, Jan 15, 2009 at 10:10 PM, Ron Teitelbaum <[hidden email]>
> wrote:
> >
> > I did one but didn't release it anywhere.  I did metaphone and double
> > metaphone.
> >
> >
> >
> > Maybe I can dig it up.  When did you need it?
> >
> >
> >
> > Ron Teitelbaum
> >
> >
> >
> > ________________________________
> >
> > From: [hidden email]
> > [mailto:[hidden email]] On Behalf Of Rob
> > Rothwell
> > Sent: Monday, January 12, 2009 4:39 PM
> > To: Beginners Sqeak
> > Subject: [Newbies] SoundEx algorithm
> >
> >
> >
> > Does anyone know of a SoundEx algorithm in Squeak before I go write one
> > myself?
> >
> > Never hurts to ask!
> >
> > Rob
> >
> >
> >
> >
> >


Reply | Threaded
Open this post in threaded view
|

RE: [squeak-dev] SoundsLike package released on SqueakSource

Ron Teitelbaum
In reply to this post by Ian Trudel-2
Hi Ian,

Sorry, I read your question wrong.  Double Metaphone is for English only but
it does work if non English spellers are doing the typing.  I didn't write
the algorithm I just made it work in Smalltalk.

Ron

> -----Original Message-----
> From: Ron Teitelbaum [mailto:[hidden email]]
> Sent: Friday, January 16, 2009 11:38 AM
> To: 'Ian Trudel'; 'The general-purpose Squeak developers list'
> Subject: RE: [squeak-dev] SoundsLike package released on SqueakSource
>
> Hi Ian,
>
> This is from WikiPedia: http://en.wikipedia.org/wiki/Double_Metaphone
>
> Use the Double Metaphone if you are interested in other languages.
>
> The Double Metaphone search algorithm is a phonetic algorithm written by
> Lawrence Philips and is the second generation of his Metaphone algorithm.
> Its implementation was described in the June 2000 issue of C/C++ Users
> Journal.
>
> It is called "Double" because it can return both a primary and a secondary
> code for a string; this accounts for some ambiguous cases as well as for
> multiple variants of surnames with common ancestry. For example, encoding
> the name "Smith" yields a primary code of SM0 and a secondary code of XMT,
> while the name "Schmidt" yields a primary code of XMT and a secondary code
> of SMT--both have XMT in common.
>
> Double Metaphone tries to account for myriad irregularities in English of
> Slavic, Germanic, Celtic, Greek, French, Italian, Spanish, Chinese, and
> other origin. Thus it uses a much more complex ruleset for coding than its
> predecessor; for example, it tests for approximately 100 different
> contexts of the use of the letter C alone. In the introduction to his
> original journal article, Mr. Philips defended this complexity.
>
> Hope that helps!
>
> Ron Teitelbaum
>
> > -----Original Message-----
> > From: Ian Trudel [mailto:[hidden email]]
> > Sent: Friday, January 16, 2009 11:29 AM
> > To: [hidden email]; The general-purpose Squeak developers list
> > Subject: Re: [squeak-dev] SoundsLike package released on SqueakSource
> >
> > Sounds great, Ron! Has SoundsLike only English phonetics or it is
> > possible to define and use phonetics from other languages? Let's say,
> > multilingual. :)
> >
> > Ian
> >
> > 2009/1/16 Ron Teitelbaum <[hidden email]>:
> > > Hello all,
> > >
> > >
> > >
> > > I have released a new package on SqueakSource that contains SoundEx
> and
> > > DoubleMetaphone.
> > >
> > >
> > >
> > > http://www.squeaksource.com/SoundsLike.html
> > >
> > >
> > >
> > > This package adds soundsLike: to string
> > >
> > >
> > >
> > > 'titlebalm' soundsLike: 'teitelbaum'
> > >
> > >
> > >
> > > You can also get the phenoticStringsFor: a word to store in a database
> > for
> > > later queries.
> > >
> > >
> > >
> > > PhoneticStringComparator defaultClass "SoundEx" new
> phoneticStringsFor:
> > > 'titlebalm' #('T341')
> > >
> > >
> > >
> > > DoubleMetaphoneStringComparator new phoneticStringsFor: 'teitelbaum'
> > > #('TTLPM' 'TTLPM')
> > >
> > >
> > >
> > > Let me know if you have any questions.
> > >
> > >
> > >
> > > Regards,
> > >
> > >
> > >
> > > Ron Teitelbaum
> > >
> > >
> > >
> > >
> > >
> > > ________________________________
> > >
> > > From: [hidden email]
> > > [mailto:[hidden email]] On Behalf Of Rob
> > > Rothwell
> > > Sent: Friday, January 16, 2009 6:35 AM
> > > To: [hidden email]
> > > Cc: A friendly place to get answers to even the most basic
> > > questionsaboutSqueak.
> > > Subject: Re: [Newbies] SoundEx algorithm
> > >
> > >
> > >
> > > No rush...I am working on a custom recipe program for my wife and
> wanted
> > to
> > > use it to search ingredients and still find something that was
> > misspelled!
> > >
> > > Thanks,
> > >
> > > Rob
> > >
> > > On Thu, Jan 15, 2009 at 10:10 PM, Ron Teitelbaum <[hidden email]>
> > wrote:
> > >
> > > I did one but didn't release it anywhere.  I did metaphone and double
> > > metaphone.
> > >
> > >
> > >
> > > Maybe I can dig it up.  When did you need it?
> > >
> > >
> > >
> > > Ron Teitelbaum
> > >
> > >
> > >
> > > ________________________________
> > >
> > > From: [hidden email]
> > > [mailto:[hidden email]] On Behalf Of Rob
> > > Rothwell
> > > Sent: Monday, January 12, 2009 4:39 PM
> > > To: Beginners Sqeak
> > > Subject: [Newbies] SoundEx algorithm
> > >
> > >
> > >
> > > Does anyone know of a SoundEx algorithm in Squeak before I go write
> one
> > > myself?
> > >
> > > Never hurts to ask!
> > >
> > > Rob
> > >
> > >
> > >
> > >
> > >


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] SoundsLike package released on SqueakSource

Rob Rothwell
In reply to this post by Ron Teitelbaum
Hmmm...even in a 3.9-7067 fresh image, I get a Syntax error when trying to load from Monticello:

testProcessCxNothing more expected ->_1
    dmsc inputKey: 'abcdefg'.
    self should: [ dmsc inputKey = 'ABCDEFG' ].

    self should: [ dmsc primaryTranslation = '' ].
    self should: [ dmsc secondaryTranslation = '' ].
    self should: [ dmsc skipCount = 0 ].
    dmsc currentIndex: 3.

    dmsc processC.

    self should: [ dmsc primaryTranslation = 'K' ].
    self should: [ dmsc secondaryTranslation = 'K' ].
    self should: [ dmsc skipCount = 0 ]

Rob

On Fri, Jan 16, 2009 at 11:37 AM, Ron Teitelbaum <[hidden email]> wrote:
Hi Ian,

This is from WikiPedia: http://en.wikipedia.org/wiki/Double_Metaphone

Use the Double Metaphone if you are interested in other languages.

The Double Metaphone search algorithm is a phonetic algorithm written by
Lawrence Philips and is the second generation of his Metaphone algorithm.
Its implementation was described in the June 2000 issue of C/C++ Users
Journal.

It is called "Double" because it can return both a primary and a secondary
code for a string; this accounts for some ambiguous cases as well as for
multiple variants of surnames with common ancestry. For example, encoding
the name "Smith" yields a primary code of SM0 and a secondary code of XMT,
while the name "Schmidt" yields a primary code of XMT and a secondary code
of SMT--both have XMT in common.

Double Metaphone tries to account for myriad irregularities in English of
Slavic, Germanic, Celtic, Greek, French, Italian, Spanish, Chinese, and
other origin. Thus it uses a much more complex ruleset for coding than its
predecessor; for example, it tests for approximately 100 different contexts
of the use of the letter C alone. In the introduction to his original
journal article, Mr. Philips defended this complexity.

Hope that helps!

Ron Teitelbaum

> -----Original Message-----
> From: Ian Trudel [mailto:[hidden email]]
> Sent: Friday, January 16, 2009 11:29 AM
> To: [hidden email]; The general-purpose Squeak developers list
> Subject: Re: [squeak-dev] SoundsLike package released on SqueakSource
>
> Sounds great, Ron! Has SoundsLike only English phonetics or it is
> possible to define and use phonetics from other languages? Let's say,
> multilingual. :)
>
> Ian
>
> 2009/1/16 Ron Teitelbaum <[hidden email]>:
> > Hello all,
> >
> >
> >
> > I have released a new package on SqueakSource that contains SoundEx and
> > DoubleMetaphone.
> >
> >
> >
> > http://www.squeaksource.com/SoundsLike.html
> >
> >
> >
> > This package adds soundsLike: to string
> >
> >
> >
> > 'titlebalm' soundsLike: 'teitelbaum'
> >
> >
> >
> > You can also get the phenoticStringsFor: a word to store in a database
> for
> > later queries.
> >
> >
> >
> > PhoneticStringComparator defaultClass "SoundEx" new phoneticStringsFor:
> > 'titlebalm' #('T341')
> >
> >
> >
> > DoubleMetaphoneStringComparator new phoneticStringsFor: 'teitelbaum'
> > #('TTLPM' 'TTLPM')
> >
> >
> >
> > Let me know if you have any questions.
> >
> >
> >
> > Regards,
> >
> >
> >
> > Ron Teitelbaum
> >
> >
> >
> >
> >
> > ________________________________
> >
> > From: [hidden email]
> > [mailto:[hidden email]] On Behalf Of Rob
> > Rothwell
> > Sent: Friday, January 16, 2009 6:35 AM
> > To: [hidden email]
> > Cc: A friendly place to get answers to even the most basic
> > questionsaboutSqueak.
> > Subject: Re: [Newbies] SoundEx algorithm
> >
> >
> >
> > No rush...I am working on a custom recipe program for my wife and wanted
> to
> > use it to search ingredients and still find something that was
> misspelled!
> >
> > Thanks,
> >
> > Rob
> >
> > On Thu, Jan 15, 2009 at 10:10 PM, Ron Teitelbaum <[hidden email]>
> wrote:
> >
> > I did one but didn't release it anywhere.  I did metaphone and double
> > metaphone.
> >
> >
> >
> > Maybe I can dig it up.  When did you need it?
> >
> >
> >
> > Ron Teitelbaum
> >
> >
> >
> > ________________________________
> >
> > From: [hidden email]
> > [mailto:[hidden email]] On Behalf Of Rob
> > Rothwell
> > Sent: Monday, January 12, 2009 4:39 PM
> > To: Beginners Sqeak
> > Subject: [Newbies] SoundEx algorithm
> >
> >
> >
> > Does anyone know of a SoundEx algorithm in Squeak before I go write one
> > myself?
> >
> > Never hurts to ask!
> >
> > Rob
> >
> >
> >
> >
> >





Reply | Threaded
Open this post in threaded view
|

RE: [squeak-dev] SoundsLike package released on SqueakSource

Ron Teitelbaum

Sorry about that I’ll have a look and fix it over the weekend.  I run it in 3.9 also so it should work.

 

Ron

 


From: Rob Rothwell [mailto:[hidden email]]
Sent: Friday, January 16, 2009 8:32 PM
To: [hidden email]; The general-purpose Squeak developers list
Cc: Ian Trudel
Subject: Re: [squeak-dev] SoundsLike package released on SqueakSource

 

Hmmm...even in a 3.9-7067 fresh image, I get a Syntax error when trying to load from Monticello:

testProcessCxNothing more expected ->_1
    dmsc inputKey: 'abcdefg'.
    self should: [ dmsc inputKey = 'ABCDEFG' ].

    self should: [ dmsc primaryTranslation = '' ].
    self should: [ dmsc secondaryTranslation = '' ].
    self should: [ dmsc skipCount = 0 ].
    dmsc currentIndex: 3.

    dmsc processC.

    self should: [ dmsc primaryTranslation = 'K' ].
    self should: [ dmsc secondaryTranslation = 'K' ].
    self should: [ dmsc skipCount = 0 ]

Rob

On Fri, Jan 16, 2009 at 11:37 AM, Ron Teitelbaum <[hidden email]> wrote:

Hi Ian,

This is from WikiPedia: http://en.wikipedia.org/wiki/Double_Metaphone

Use the Double Metaphone if you are interested in other languages.

The Double Metaphone search algorithm is a phonetic algorithm written by
Lawrence Philips and is the second generation of his Metaphone algorithm.
Its implementation was described in the June 2000 issue of C/C++ Users
Journal.

It is called "Double" because it can return both a primary and a secondary
code for a string; this accounts for some ambiguous cases as well as for
multiple variants of surnames with common ancestry. For example, encoding
the name "Smith" yields a primary code of SM0 and a secondary code of XMT,
while the name "Schmidt" yields a primary code of XMT and a secondary code
of SMT--both have XMT in common.

Double Metaphone tries to account for myriad irregularities in English of
Slavic, Germanic, Celtic, Greek, French, Italian, Spanish, Chinese, and
other origin. Thus it uses a much more complex ruleset for coding than its
predecessor; for example, it tests for approximately 100 different contexts
of the use of the letter C alone. In the introduction to his original
journal article, Mr. Philips defended this complexity.

Hope that helps!

Ron Teitelbaum


> -----Original Message-----
> From: Ian Trudel [mailto:[hidden email]]
> Sent: Friday, January 16, 2009 11:29 AM
> To: [hidden email]; The general-purpose Squeak developers list
> Subject: Re: [squeak-dev] SoundsLike package released on SqueakSource
>
> Sounds great, Ron! Has SoundsLike only English phonetics or it is
> possible to define and use phonetics from other languages? Let's say,
> multilingual. :)
>
> Ian
>
> 2009/1/16 Ron Teitelbaum <[hidden email]>:
> > Hello all,
> >
> >
> >
> > I have released a new package on SqueakSource that contains SoundEx and
> > DoubleMetaphone.
> >
> >
> >
> > http://www.squeaksource.com/SoundsLike.html
> >
> >
> >
> > This package adds soundsLike: to string
> >
> >
> >
> > 'titlebalm' soundsLike: 'teitelbaum'
> >
> >
> >
> > You can also get the phenoticStringsFor: a word to store in a database
> for
> > later queries.
> >
> >
> >
> > PhoneticStringComparator defaultClass "SoundEx" new phoneticStringsFor:
> > 'titlebalm' #('T341')
> >
> >
> >
> > DoubleMetaphoneStringComparator new phoneticStringsFor: 'teitelbaum'
> > #('TTLPM' 'TTLPM')
> >
> >
> >
> > Let me know if you have any questions.
> >
> >
> >
> > Regards,
> >
> >
> >
> > Ron Teitelbaum
> >
> >
> >
> >
> >
> > ________________________________
> >
> > From: [hidden email]
> > [mailto:[hidden email]] On Behalf Of Rob
> > Rothwell
> > Sent: Friday, January 16, 2009 6:35 AM
> > To: [hidden email]
> > Cc: A friendly place to get answers to even the most basic
> > questionsaboutSqueak.
> > Subject: Re: [Newbies] SoundEx algorithm
> >
> >
> >
> > No rush...I am working on a custom recipe program for my wife and wanted
> to
> > use it to search ingredients and still find something that was
> misspelled!
> >
> > Thanks,
> >
> > Rob
> >
> > On Thu, Jan 15, 2009 at 10:10 PM, Ron Teitelbaum <[hidden email]>
> wrote:
> >
> > I did one but didn't release it anywhere.  I did metaphone and double
> > metaphone.
> >
> >
> >
> > Maybe I can dig it up.  When did you need it?
> >
> >
> >
> > Ron Teitelbaum
> >
> >
> >
> > ________________________________
> >
> > From: [hidden email]
> > [mailto:[hidden email]] On Behalf Of Rob
> > Rothwell
> > Sent: Monday, January 12, 2009 4:39 PM
> > To: Beginners Sqeak
> > Subject: [Newbies] SoundEx algorithm
> >
> >
> >
> > Does anyone know of a SoundEx algorithm in Squeak before I go write one
> > myself?
> >
> > Never hurts to ask!
> >
> > Rob
> >
> >
> >
> >
> >

 



Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] SoundsLike package released on SqueakSource

Rob Rothwell
In reply to this post by Ron Teitelbaum
I put another version on SqueakSource that simply renamed testProcessCx_1 to testProcessCx1a because I was getting load errors...

Rob

On Fri, Jan 16, 2009 at 11:37 AM, Ron Teitelbaum <[hidden email]> wrote:
Hi Ian,

This is from WikiPedia: http://en.wikipedia.org/wiki/Double_Metaphone

Use the Double Metaphone if you are interested in other languages.

The Double Metaphone search algorithm is a phonetic algorithm written by
Lawrence Philips and is the second generation of his Metaphone algorithm.
Its implementation was described in the June 2000 issue of C/C++ Users
Journal.

It is called "Double" because it can return both a primary and a secondary
code for a string; this accounts for some ambiguous cases as well as for
multiple variants of surnames with common ancestry. For example, encoding
the name "Smith" yields a primary code of SM0 and a secondary code of XMT,
while the name "Schmidt" yields a primary code of XMT and a secondary code
of SMT--both have XMT in common.

Double Metaphone tries to account for myriad irregularities in English of
Slavic, Germanic, Celtic, Greek, French, Italian, Spanish, Chinese, and
other origin. Thus it uses a much more complex ruleset for coding than its
predecessor; for example, it tests for approximately 100 different contexts
of the use of the letter C alone. In the introduction to his original
journal article, Mr. Philips defended this complexity.

Hope that helps!

Ron Teitelbaum

> -----Original Message-----
> From: Ian Trudel [mailto:[hidden email]]
> Sent: Friday, January 16, 2009 11:29 AM
> To: [hidden email]; The general-purpose Squeak developers list
> Subject: Re: [squeak-dev] SoundsLike package released on SqueakSource
>
> Sounds great, Ron! Has SoundsLike only English phonetics or it is
> possible to define and use phonetics from other languages? Let's say,
> multilingual. :)
>
> Ian
>
> 2009/1/16 Ron Teitelbaum <[hidden email]>:
> > Hello all,
> >
> >
> >
> > I have released a new package on SqueakSource that contains SoundEx and
> > DoubleMetaphone.
> >
> >
> >
> > http://www.squeaksource.com/SoundsLike.html
> >
> >
> >
> > This package adds soundsLike: to string
> >
> >
> >
> > 'titlebalm' soundsLike: 'teitelbaum'
> >
> >
> >
> > You can also get the phenoticStringsFor: a word to store in a database
> for
> > later queries.
> >
> >
> >
> > PhoneticStringComparator defaultClass "SoundEx" new phoneticStringsFor:
> > 'titlebalm' #('T341')
> >
> >
> >
> > DoubleMetaphoneStringComparator new phoneticStringsFor: 'teitelbaum'
> > #('TTLPM' 'TTLPM')
> >
> >
> >
> > Let me know if you have any questions.
> >
> >
> >
> > Regards,
> >
> >
> >
> > Ron Teitelbaum
> >
> >
> >
> >
> >
> > ________________________________
> >
> > From: [hidden email]
> > [mailto:[hidden email]] On Behalf Of Rob
> > Rothwell
> > Sent: Friday, January 16, 2009 6:35 AM
> > To: [hidden email]
> > Cc: A friendly place to get answers to even the most basic
> > questionsaboutSqueak.
> > Subject: Re: [Newbies] SoundEx algorithm
> >
> >
> >
> > No rush...I am working on a custom recipe program for my wife and wanted
> to
> > use it to search ingredients and still find something that was
> misspelled!
> >
> > Thanks,
> >
> > Rob
> >
> > On Thu, Jan 15, 2009 at 10:10 PM, Ron Teitelbaum <[hidden email]>
> wrote:
> >
> > I did one but didn't release it anywhere.  I did metaphone and double
> > metaphone.
> >
> >
> >
> > Maybe I can dig it up.  When did you need it?
> >
> >
> >
> > Ron Teitelbaum
> >
> >
> >
> > ________________________________
> >
> > From: [hidden email]
> > [mailto:[hidden email]] On Behalf Of Rob
> > Rothwell
> > Sent: Monday, January 12, 2009 4:39 PM
> > To: Beginners Sqeak
> > Subject: [Newbies] SoundEx algorithm
> >
> >
> >
> > Does anyone know of a SoundEx algorithm in Squeak before I go write one
> > myself?
> >
> > Never hurts to ask!
> >
> > Rob
> >
> >
> >
> >
> >