## [Gramps-devel] Surname prefixes

 [Gramps-devel] Surname prefixes From: Don Allingham - 2002-12-01 03:31:13 ```I've been experimenting with handling surname prefixes for sorting. What this means is that "Fred de Marco" would be sorted as if the name was "Fred Marco". The algorithm I'm using is pretty simple right now. It goes something like: 1) split the surname into strings using spaces as delimiters 2) if the split name has more than one part, check the first part against a list of know prefixes 3) If the prefix matches, use the second part of the string as the sort string, otherwise use the whole surname as the sort string Does this seem like a reasonable algorithm? If so, I need a list of prefixes that should be used. The list I currently have is: de, van, von, la, di, le, du Don ```

 [Gramps-devel] Surname prefixes From: Don Allingham - 2002-12-01 03:31:13 ```I've been experimenting with handling surname prefixes for sorting. What this means is that "Fred de Marco" would be sorted as if the name was "Fred Marco". The algorithm I'm using is pretty simple right now. It goes something like: 1) split the surname into strings using spaces as delimiters 2) if the split name has more than one part, check the first part against a list of know prefixes 3) If the prefix matches, use the second part of the string as the sort string, otherwise use the whole surname as the sort string Does this seem like a reasonable algorithm? If so, I need a list of prefixes that should be used. The list I currently have is: de, van, von, la, di, le, du Don ```
 Re: [Gramps-devel] Surname prefixes From: Bernd Schandl - 2002-12-01 11:56:21 ```On 30 Nov 2002, Don Allingham wrote: > I've been experimenting with handling surname prefixes for sorting. What > this means is that "Fred de Marco" would be sorted as if the name was > "Fred Marco". The algorithm I'm using is pretty simple right now. It > goes something like: > > 1) split the surname into strings using spaces as delimiters > 2) if the split name has more than one part, check the first part > against a list of know prefixes > 3) If the prefix matches, use the second part of the string as the > sort string, otherwise use the whole surname as the sort string I am pretty sure that we will get in troube sometimes, so the user should be able to switch this off. I have friend who is called "Martin von la Roche". Also, in German, there is (or at least was) the possibility to have a noble name like "Peter von und zu Hohenstein". Maybe you should not only check the first word but starting withe first word until there is a word that does not match. Also it might be reasonable to have the list configurable in the preferences - otherwise a user from a "new" country would have to ask for a new version of GRAMPS just to get support for his names. I remember that there were some lengthy discussion about sorting names in a bibliography in the LaTeX newsgroup but I think it was never really resolved what would be the "right" way to do it. > Does this seem like a reasonable algorithm? If so, I need a list of > prefixes that should be used. The list I currently have is: > > de, van, von, la, di, le, du Please add "zu" and "und". Bernd -- Bernd Schandl Tired of spam? Use spamcop.net to complain! ```
 Re: [Gramps-devel] Surname prefixes From: whitehat - 2002-12-01 12:35:26 ```I like the idea. As I was reading this something immediately poped into my head. The issue of translation becasue those prefixes as you may know are not necessaryly part of a name but historically have been used to indicate an a place of origin. There may also be other conditions were the prefix is used as a modifier in a different sence. I would suggest that another module, options, dialog box be created to handle those prefixes, translations. Another potential problem is a two word prefix, or possibly a three word prefix. Another issue is the option to allow/disallow that processing on a per user basis. Just my initial thoughts. Lou. ----- Original Message ----- From: "Don Allingham" To: Sent: Saturday, November 30, 2002 10:26 PM Subject: [Gramps-devel] Surname prefixes > I've been experimenting with handling surname prefixes for sorting. What > this means is that "Fred de Marco" would be sorted as if the name was > "Fred Marco". The algorithm I'm using is pretty simple right now. It > goes something like: > > 1) split the surname into strings using spaces as delimiters > 2) if the split name has more than one part, check the first part > against a list of know prefixes > 3) If the prefix matches, use the second part of the string as the > sort string, otherwise use the whole surname as the sort string > > Does this seem like a reasonable algorithm? If so, I need a list of > prefixes that should be used. The list I currently have is: > > de, van, von, la, di, le, du > > Don > > > > > > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Get the new Palm Tungsten T > handheld. Power & Color in a compact size! > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en > _______________________________________________ > Gramps-devel mailing list > Gramps-devel@... > https://lists.sourceforge.net/lists/listinfo/gramps-devel > ```
 Re: [Gramps-devel] Surname prefixes From: Alexandre Duret-Lutz - 2002-12-01 14:21:59 ```>>> "Don" == Don Allingham writes: Don> I've been experimenting with handling surname prefixes for sorting. What Don> this means is that "Fred de Marco" would be sorted as if the name was Don> "Fred Marco". The algorithm I'm using is pretty simple right now. It Don> goes something like: Don> 1) split the surname into strings using spaces as delimiters Don> 2) if the split name has more than one part, check the first part Don> against a list of know prefixes Don> 3) If the prefix matches, use the second part of the string as the Don> sort string, otherwise use the whole surname as the sort string Shouldn't you use all the remaining parts, instead of just the second? Maybe you could also consider sorting `Mc' as `Mac '. Macbeth McCoy, Tyner Madison, James However I doubt a locale-independent algorithm exists. For instance in French it seems fine to remove a leading `de ': « Étienne de La Boétie » should be indexed at « La Boétie », « Jean de La Fontaine » at « La Fontaine », « Savinien de Cyrano de Bergerac » at « Cyrano de Bergerac ». however it would be wrong to remove a leading `Le ' or `Du ': « Maxime Du Camp » shoud be indexed at « Du Camp », « Gustave Le Rouge » at « Le Rouge ». I'm not sure imposing a casing convention (e.g. ignore only lowercase words) is practicable, since many genealogists like to write capitalized surnames. Also, it's very common to reject leading `de' into the forename as follows. Cyrano de Bergerac, Savinien de Du Camp, Maxime Le Rouge, Gustave La Boétie, Étienne de La Fontaine, Jean de This is sorted fine using with a simple strcmp-sort. It will look disordered if you start to ignore `Du ', `Le ', and `La '. If such sorting is important, maybe you could consider adding a new field to each person: "Surname for sorting". The sorting functions would use the Surname unless a "Surname for sorting" was explicitely given by the user. -- Alexandre Duret-Lutz ```