String Matching

Crittar

Member
Bendaluz,

There has definitely been one mentioned on here, it is a free download, I can't remember the site name but I seem to recall it's the same one that smtpmail.p is on if that helps.
 

Crittar

Member
Bendaluz,

(Or anyone else for that matter :) )

Did you ever find a phonetic search?

As luck would have it it's my turn to look for one now. Heving searched previous threads there are two mentioned: soundex and metaphone. From comments made in those threads it would seem to me that soundex (which I can locate the code for) is not suitable, metaphone sounds like it would be but there does not appear to be a link to any code for the program.

The only reference I have seen to the code for metaphone is on PEG imported threads and, knowing PEG's opinion of ProgressTalk I don't fancy my chances of getting hold of it from that source.

Does anyone out there have a copy of metaphone.p (as long as it is not copyright) or something similar that they could post on here or send to me direct please?

TIA & BR
 
Progress very kindly include a .p which does a basic soundex conversion in the scr/samples directory of your installation.

def var lc-name as cha no-undo.
def var lc-soundex as cha no-undo.

repeat:
update lc-name.
run src/samples/soundex.p (input lc-name, output lc-soundex).
display lc-soundex.

end.

Next time I'm in England I'll take you up on the beer! I come over periodically to visit family (only been in Aus 5+ years)
 

Crittar

Member
Toby,

I'm not sure if that sample comes with the Chui version of Progress but even if it does, from what I've read on here it sounds as if metaphone.p would be better suited to my needs as at takes into account 'soundalike' letters (e.g. C, K, or N, KN).

If all else fails I will re-invent the wheel.

Look forward to sharing that beer!
 
If you are after a ready-made solution, sorry can't help, but I have a URL for an excellent 'C' English-to-phoneme translator.

A while back I was looking for something that was good enough to recognize KALKYOULAYTOR as CALCULATOR, I never found it but this is the closest I came across. It is based on the NRL report "Automatic translation of English text to phonetics by means of letter-to-sound rules" and has very good in-code documentation of the technique used.

You could (with out too much trouble) get the rules and pseudo code from english.c and implement this in progress. It uses simple string manipulation that could be implemented quite well in progress with SUBSTRING,MATCHES and BEGINS statements.

Another option is to use the C code to create an ActiveX or DLL routine and call this from progress (much faster, but you will need C skills and a Compiler, you will also have to the ship/register your DLL/OCX with your application).


English to Phoneme Translation
 

Crittar

Member
Simon, Toby,

Many thanks for your replies, I will investigate both of these. I think Toby's is the favourite as I don't have C skills and it saves me having to reverse engineer the C program. I could possibly impliment it as a C program but I'm not sure how to do that under Unix (we are Chui based on a Unix box).

Your help is much appreciated guys, once again, thankyou.
 

bendaluz2

Member
The soundex sample does come with chui, at least with ver 8.3C. Though, its use is limited and metaphone does sound a much better alternative

Crittar said:
Toby,

I'm not sure if that sample comes with the Chui version of Progress but even if it does, from what I've read on here it sounds as if metaphone.p would be better suited to my needs as at takes into account 'soundalike' letters (e.g. C, K, or N, KN).

If all else fails I will re-invent the wheel.

Look forward to sharing that beer!
 
Top