Should the first 3 digits of cn_sort be sorted for dewey decimal?
The documentation for GetClassSortKey says * Concatenates class and item part. * Converts to uppercase. * Removes leading and trailing whitespace and '/' * Separates alphabetic prefix from the rest of the call number * Splits into tokens on whitespaces and periods. * Leaves first digit group as is. ... this means that callnumbers 9.1 => 9_100000000000000 80.1 => 80_100000000000000 700.1 => 700_100000000000000 when sorted ascending by cn_sort 700.1 => 700_100000000000000 80.1 => 80_100000000000000 9.1 => 9_100000000000000 Shouldn't these be zero padded to 3 digits, so that they sort as follows? 009_100000000000000 080_100000000000000 700_100000000000000
Hi Barton
this means that callnumbers
9.1 => 9_100000000000000 80.1 => 80_100000000000000 700.1 => 700_100000000000000
when sorted ascending by cn_sort
700.1 => 700_100000000000000 80.1 => 80_100000000000000 9.1 => 9_100000000000000
Shouldn't these be zero padded to 3 digits, so that they sort as follows?
009_100000000000000 080_100000000000000 700_100000000000000
Dewey Decimal Classification uses characters that indeed do look like Arabic numbers (standing for classes, divisions, sections), but these characters do not behave like numbers, so the correct sorting is actually not as you would expect (namely seen from the right to left) 1 2 11 21 100 230 but (and thus seen from left to right) 1 100 11 2 21 230 Hope this helps. Best wishes: Michael -- Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz T 0041 (0)61 261 55 61 · E mik@adminkuhn.ch · W www.adminkuhn.ch
On Sat, Jun 16, 2018 at 2:37 AM, Michael Kuhn <mik@adminkuhn.ch> wrote:
Dewey Decimal Classification uses characters that indeed do look like Arabic numbers (standing for classes, divisions, sections), but these characters do not behave like numbers, so the correct sorting is actually not as you would expect (namely seen from the right to left)
1 2 11 21 100 230
but (and thus seen from left to right)
1 100 11 2 21 230
Hope this helps.
That's' not the way I understand it. The Dewey classes:
000 – Computer science, information & general works 100 – Philosophy and psychology 200 – Religion 300 – Social sciences 400 – Language 500 – Pure Science 600 – Technology 700 – Arts & recreation 800 – Literature 900 – History & geography 000 is sub-divided into the hundreds group 000 Computer science, knowledge & systems 010 Bibliographies 020 Library & information sciences 030 Encyclopedias & books of facts 040 [Unassigned] 050 Magazines, journals & serials 060 Associations, organizations & museums 070 News media, journalism & publishing 080 Quotations 090 Manuscripts & rare books and then sub-divided again into the thousands groups... 000 Computer science, information & general works 001 Knowledge 002 The book 003 Systems 004 Data processing & computer science 005 Computer programming, programs & data 006 Special computer methods 007 [Unassigned] 008 [Unassigned] 009 [Unassigned] ...and then sub-divisions of the thousands are done after the decimal point -- 001.1, 001.2, etc... as such, I don't think that callnumber 1.1 is a valid DDC number... it lacks the class and hundred-level group, and should, for the purposes of cn_sort, be converted to 001_100000000000000. (Numbers above are taken from https://www.oclc.org/content/dam/oclc/dewey/DDC%2023_Summaries.pdf).
Hi Barton
...and then sub-divisions of the thousands are done after the decimal point -- 001.1, 001.2, etc...
as such, I don't think that callnumber 1.1 is a valid DDC number... it lacks the class and hundred-level group, and should, for the purposes of cn_sort, be converted to 001_100000000000000.
(Numbers above are taken from https://www.oclc.org/content/dam/oclc/dewey/DDC%2023_Summaries.pdf).
Looking deeper into it it seems I was just talking about the classic "decimal classification" which doesn't have leading zeroes. There are too many variants of it, one of them being the Dewey Decimal Classification / DDC - which actually seems to behave as you say, including leading zeroes. I wasn't aware of that difference. As far as I know the DDC is mostly used in the USA but also in Europe many peopöle are referring to "Dewey" when they actually mean their local decimal classification. So I guess many libraries are filling the DDC fields with content that is actually not proper DDC but their own variant of a decimal classification (for example I would think in Europe it will often be another hairy variant of the Universal Decimal Classification / UDC that behaves the way I described - see https://en.wikipedia.org/wiki/Universal_Decimal_Classification). Best wishes: Michael -- Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz T 0041 (0)61 261 55 61 · E mik@adminkuhn.ch · W www.adminkuhn.ch
Very interesting! Thanks for the link.
I've filed Bug 20961 : cn_sort for DDC callnumbers should between 1 and 99 should be formatted as 001.* - 099.* URL : https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20961 Priority : P5 - low Assigned To : koha-bugs@lists.koha-community.org Urgency : enhancement Status : NEW On Sat, Jun 16, 2018 at 3:32 PM, Barton Chittenden < barton@bywatersolutions.com> wrote:
Very interesting!
Thanks for the link.
participants (2)
-
Barton Chittenden -
Michael Kuhn