Re: [greenstone-devel] Creator metadata sorting

From Michael Dewsnip
DateTue, 15 Jul 2003 11:23:51 +1200
Subject Re: [greenstone-devel] Creator metadata sorting
In-Reply-To (OF0096FC35-1CB1B520-ON69256D5E-0021D115-69256D5E-0021D141-ntu-edu-au)
Hi Stephen,

It seems that this is a problem that was fixed in version 2.40. The code from
sorttools.pm that you include below is from the 2.40 version, so I am assuming
you have upgraded. Remember that you will need to rebuild your collection to
regenerate the classifier structures.

Please let me know if you still have problems with this.

Regards,

Michael Dewsnip

Stephen.DeGabrielle@ntu.edu.au wrote:

> Hi,
> We have noticed our sorting going a bit funny when we use the DC 'Creator'
> metadata tag; it calls sorttools.pm;
>
> -from sorttools.pm--
> # format an english name for sorting
> # i.e. convert to lowercase, put surname before
> # first names etc.
> sub format_string_name_english {
> my ($stringref) = @_;
>
> $$stringref =~ tr/A-Z/a-z/;
> $$stringref =~ s/&S+;//g;
>
> my $comma_format = ($$stringref =~ m/^.+,.+$/);
>
> $$stringref =~ s/[^a-z0-9 ]//g;
> $$stringref =~ s/s+/ /g;
> $$stringref =~ s/^s+//;
>
> if (!$comma_format) {
> # No commas in name => name in 'firstname surname' format
> # need to sort by surname
> my @names = split / /, $$stringref;
> my $surname = pop @names;
> while (scalar @names && $surname =~ /^(jnr|snr)$/i) {
> $surname = pop @names;
> }
> $$stringref = $surname . " " . $$stringref;
> }
> }
> --
> sorttools.pm seems to fail to detect the comma in our author data.
> Here is an example of the default creator name sorting as sorted by
> AZcompactList;
>
> Lindgren, K. E. (Kevin Edmund), 1940-
>
> Latimer, Paul, 1947-
>
> Vermeesch, R. B. (Robert Bryan)
>
> Trotter, Chris
>
> Thwaites, Tony G. (Anthony Guy)
>
> Srivastava, Dhirendra K. (Dhirendra Kumar)
>
> Davis, Lloyd
>
> Thomson, Neil
>
> Singh, P.
>
> Kakadu National Park
>
> Deklin, T.
>
> Mules, Warwick
>
> While we can change to another metadata tag for our creator metadata we
> would prefer to stick to the DC standard - I have edited AZCompactlist.pm
> to get the correct behaviour but this is really a pretty bad fudge - I
> could do a switch to turn of this behaviour for the Creator metadata tag or
> is there a better option?
>
> Thanks for your help,
>
> Stephen De Gabrielle
>
> --
> "Creators should be listed separately in the same order that they appear in
> the publication. Personal names should be listed surname or family name
> first, followed by forename or given name. When in doubt, give the name as
> it appears, and do not invert."
> --
> http://dublincore.org/documents/2001/04/12/usageguide/sectc.shtml#creator
>
> _______________________________________________
> greenstone-devel mailing list
> greenstone-devel@list.scms.waikato.ac.nz
> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-devel