Re: [greenstone-users] AZList and initial articles

From Michael Dewsnip
DateFri, 25 Jun 2004 11:07:16 +1200
Subject Re: [greenstone-users] AZList and initial articles
Hi Jackie,

Sorting the values for an AZList is done by the
format_metadata_for_sorting function in perllib/classify/

Unless the metadata values are non-English, there are two cases:

- If the metadata is "Creator" metadata, the
sorttools::format_string_name_english function is called. This will sort
"A. W. B." by the last value ("B"). I think this is what you want.

- Otherwise, the sorttools::format_string_english function is called.
This removes "the"/"a"/"an" etc. from the front of the values, so "A. W.
B" will be sorted by "W".

I'm guessing your author metadata is not called "Creator", which is why
you are getting the second case. You could change your metadata values
to be called Creator, but it would be easier to edit the
format_metadata_for_sorting function so that it applies the first case
to your metadata name ("Author"?) too. You'll just need to add a second
case to the if statement so it uses your metadata name as well.

Hope this helps,


Jackie Wrosch wrote:

> I am trying to build an AZList that will recognize and use
> the initial article "A". Is there a way to do this for a
> single record? Or for a single index? I've seen how to
> include additional prefixes through -removeprefix, but in
> this case we'd like to exclude for a particular record or
> index. We have an author that is referred to as "A. W. B."
> and would like the A to be recognized.
> ---------------------------------
> Jackie Wrosch
> Detroit Area Library Network
> _______________________________________________
> greenstone-users mailing list