BBC BASIC for Windows
« Splitting up complex names »
Welcome Guest. Please Login or Register. Apr 5th, 2018, 10:53pm
ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018. Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.
If you require a dump of the post on your message board, please come to the support board and request it.
Is there a way to split up a name into separate strings when the name may contain more than 2 elements? ... But how would you handle names like:- John van Smith John van de Burgh John Paul Bob Smith Jr.
Some of that requires human interaction, or a degree of artificial intelligence. For example, how does a program know which part of "John van de Burgh" is the surname? Is he Mr Burgh, first name John, middle names van de? With that example you can program in that components with a lower-case initial letter are part of the surname, but then you get Mao Ze Dung. Is he Mr Dung or Mr Ze Dung?
I've written programs that parse Census records and spit out regular data fields. When the source has had the entire name in one field I parse it backwards looking for the first space, or the last space followed by a lower case letter.
Viz: Elizabeth Anderson Gibbons Elizabeth Anderson#Gibbons Jacob Henley-Stamp Jacob#Henley-Stamp Mikael van der Holdt Mikael#van der Holdt Pietor von Tasman von Beringburg Pietor von Tasman#von Beringburg
Though it still needs outside knowledge added to it to cope with: David Lloyd George David#Lloyd George