[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [StrongED] searching for last word in a field

Gavin Wraith  wrote on 6 Dec:

> Of course, Jim, you may end up with lots of people called "Esq". I do not
> know how exotic your address list is, for many cultures do not have
> surnames, or if they do, do not necessarily write them last. With "Gaius
> Julius Caesar", for example, we have praenomen "Gaius", gentilicium
> "Julius" and cognomen "Caesar". Which is the surname? None of them, for
> such a thing did not exist in his day. Then some surnames have spaces in
> them: "Le Mesurier". To do it all properly we may need a much more
> involved algorithm.

Yes, I take your points.  I spent some years cataloguing a library, back 
in the days of card indexes.

For the purposes of my friend's Christmas card list, though, most of these 
problems do not arise.  I do spy a few infelicities in it now:

     * no occurrences of "Esq" but a couple of "MBE"
     * surnames with space (St Quintin)
     * surnames with hyphen (Scott-Evans)

In the first two cases, both Gavin and Fred's routines copied the last 
word (MBE, Quintin) to the new first field.  In the third case, NO new 
field was created.

The test for "last word before the tab" looks for a string of characters 
in a set alphabet.  Including "-" in that set would handle Scott-Evans.

As for St Quintin, hardspace could be added to the set.  (StrongEd has a 
"show invisible characters" mode, which would be useful to show that the 
name is duly typed with hardspace.)

Easiest way to deal with MBE and the like will be just to sort the list, 
which will show all those cases in a group, and then edit them manually.

Jim Nagel                            www.archivemag.co.uk

To unsubscribe send a mail to StrongED+unsubscribe@xxxxxxxxxxx
List archives and instructions at