In message <000001bf95a9$4d9e60e0$bca532d4@soloman>, Yvonne Grundy
<[log in to unmask]> writes
> I am one of the volunteers helping with the Yorkshire Quaker
> Heritage
> Project based at Hull University (
> www.hull.ac.uk/lib/archives/quaker). We
> are at present indexing the names recorded in the Quaker Minute
> Books for
> many parts of Yorkshire from 1669 to about 1950. You will be aware
> of the
> difficulties of name spelling in the earlier records.
>
> I have looked at many Soundex code algorithms and compared the
> results - not
> everyone can agree what the rules are. I have also found some
> suggestions
> for updating the algorithm and making it more applicable to British
> names; I
> can't find the original source sites but the main one will be
> Barney
> Tyrwhitt-Drake at www.tdrake.demon.co.uk.
>
> There has also been a series of articles about Access coding of
> Soundex
> codes in PC Magazine (March - May 2000) www.pcmag.co.uk .
>
> Tony Grundy
I have used the following sub - not very efficient but it works fine -
Called by Csoundex
Sub CSoundex(zz)
' requires call of the form call Csoundex(zz)
'the value of zz is replaced by its Soundex code
Dim xy As String
Dim xx As String
Dim xn As String
Dim xc As Integer
Dim xd As Integer
Dim xl As String
xx = zz
xc = 2
xx = xx & "*"
xn = Left(xx, 1)
'initial letter of code same as that of argument
xd = Asc(xn)
If xd > 95 Then xn = Chr(xd - 32)
xy = xn
'remember previous letter
xl = xn
Do Until (xn = "*")
xn = Mid(xx, xc, 1)
If xn = xl Then GoTo 50
xl = xn
If ((xn = "b") Or (xn = "B")) Then xy = xy & "1"
If ((xn = "p") Or (xn = "P")) Then xy = xy & "1"
If ((xn = "f") Or (xn = "F")) Then xy = xy & "1"
If ((xn = "v") Or (xn = "V")) Then xy = xy & "1"
If ((xn = "c") Or (xn = "C")) Then xy = xy & "2"
If ((xn = "s") Or (xn = "S")) Then xy = xy & "2"
If ((xn = "k") Or (xn = "K")) Then xy = xy & "2"
If ((xn = "g") Or (xn = "G")) Then xy = xy & "2"
If ((xn = "j") Or (xn = "J")) Then xy = xy & "2"
If ((xn = "q") Or (xn = "Q")) Then xy = xy & "2"
If ((xn = "x") Or (xn = "X")) Then xy = xy & "2"
If ((xn = "z") Or (xn = "Z")) Then xy = xy & "2"
If ((xn = "d") Or (xn = "D")) Then xy = xy & "3"
If ((xn = "t") Or (xn = "T")) Then xy = xy & "3"
If ((xn = "l") Or (xn = "L")) Then xy = xy & "4"
If ((xn = "m") Or (xn = "M")) Then xy = xy & "5"
If ((xn = "n") Or (xn = "N")) Then xy = xy & "5"
If ((xn = "r") Or (xn = "R")) Then xy = xy & "6"
50 'move to next character
xc = xc + 1
Loop
'reduce code to 4 characters
xy = xy & "000"
xy = Left(xy, 4)
zz = xy
End Sub
--
John M Chapman
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|