Created attachment 53556 [details] [review] Bug 16952: Czech language definitions for sorting in Zebra Test plan: 1) Apply patch 2) Create new instance with parameter --zebralang cs 3) Insert some record with basic latin characters and some with "czech" characters (for example: "č" - should be sorted after "c", "š" - should be sorted after "s") 4) Try to search in katalog (staff and opac) and sort by other field then relevance - title or author for instance 5) Records should be sorted correctly by Czech rules 6) Look at code and confirm it is ok
If you aren't building and installing packages after applying patches (which is most cases I think) you may need copy the new configuration file to /etc directory manually: mkdir /etc/koha/zebradb/lang_defs/cs cp etc/zebradb/lang_defs/cs/sort-string-utf.chr /etc/koha/zebradb/lang_defs/cs/
The right copy command for kohadevbox is following: cp /home/vagrant/kohaclone/etc/zebradb/lang_defs/cs/sort-string-utf.chr /etc/koha/zebradb/lang_defs/cs/
In my opinion, czech alphabet needs better sorting of characters like "a" vs. "á". For instance "Cáchovnice" should be sorted after "Carevna", but it's not: http://prntscr.com/cvrem1 I think we cannot consider eéě as the same one to be perfect. This is the correct ordering of czech characters: https://cs.wikipedia.org/wiki/Česká_abeceda
It's not true. For sorting shouldn't be used full czech alphabet. See https://cs.wikipedia.org/wiki/Abecedn%C3%AD_%C5%99azen%C3%AD or https://albatros.vlada.cz/usneseni/usneseni_webtest.nsf/WebGovRes/0AD8FEF4CC04B7A4C12571B6006D69D0?OpenDocument
Regardning your last post, the sorting is much more sofisticated. The simplified (your) alphabet is used only when we actually CAN decide about hte correct order. If we cannot, it's required to use special signs like in this example: - Sálá - Sála In this case the secondary ordering rule should be taken into account, I think.
(In reply to Radek Šiman (R-Bit Technology, s.r.o.) from comment #6) > Regardning your last post, the sorting is much more sofisticated. The > simplified (your) alphabet is used only when we actually CAN decide about > hte correct order. If we cannot, it's required to use special signs like in > this example: > - Sálá > - Sála > In this case the secondary ordering rule should be taken into account, I > think. According to Zebra documentation here: http://www.indexdata.com/zebra/doc/character-map-files.html It looks like zebra is not capable doing 2-level sorting... So propably this could be better than nothing, as it looks like secondary sorting is edge case... what do you think?
Yes, I agree, that we should sort the texts somehow reasonably. What do you think about using my first proposal, ie. sorting like aábcčdďeéě...? This seems to me as more accurate approach, even if it's not as defined simplified standard rules.
(In reply to Radek Šiman (R-Bit Technology, s.r.o.) from comment #8) > Yes, I agree, that we should sort the texts somehow reasonably. What do you > think about using my first proposal, ie. sorting like aábcčdďeéě...? This > seems to me as more accurate approach, even if it's not as defined > simplified standard rules. I can't agree with you, it would be more unaccurate approach, because if use the current patches, we are able to perfectly match the primary level of sortng as defined by ČSN 97 6030. But with your approach with doesn't implement anything... Moreover, the primary level works in most cases and merging primary and secondary levels rules together just ends like a mess in my opinion.
Ok, let's use ČSN's primary level only. Continuing the signoff process...
Unfortunately it seems, there are some issues to be solved. For instance "Kýbl" and "Kapr" are sorted in incorrect order. http://prntscr.com/cwj9mj
Created attachment 56683 [details] [review] Bug 16952: Czech language definitions for sorting in Zebra Test plan: 1) Apply patch 2) Create new instance with parameter --zebralang cs 3) Insert some record with basic latin characters and some with "czech" characters (for example: "č" - should be sorted after "c", "š" - should be sorted after "s") 4) Try to search in katalog (staff and opac) and sort by other field then relevance - title or author for instance 5) Records should be sorted correctly by Czech rules 6) Look at code and confirm it is ok
Thanks for testing! I've rebased on master and added some mappings.
What about this case...? - Kůň - Kuna http://prntscr.com/cx4101 I'm not sure if this is the right order if taking ČSN Level 1 into account. What do you thnk?
(In reply to Radek Šiman (R-Bit Technology, s.r.o.) from comment #14) > What about this case...? > - Kůň > - Kuna > > http://prntscr.com/cx4101 > > I'm not sure if this is the right order if taking ČSN Level 1 into account. > What do you thnk? I think it is right order according to this, example 2 and 3: https://cs.wikipedia.org/wiki/Abecedn%C3%AD_%C5%99azen%C3%AD#P.C5.99.C3.ADklad_.C5.99azen.C3.AD and this example - motýl noční - motýlek from http://prirucka.ujc.cas.cz/?id=900
Created attachment 56733 [details] [review] Bug 16952: Czech language definitions for sorting in Zebra Test plan: 1) Apply patch 2) Create new instance with parameter --zebralang cs 3) Insert some record with basic latin characters and some with "czech" characters (for example: "č" - should be sorted after "c", "š" - should be sorted after "s") 4) Try to search in katalog (staff and opac) and sort by other field then relevance - title or author for instance 5) Records should be sorted correctly by Czech rules 6) Look at code and confirm it is ok Signed-off-by: radiuscz <radek.siman@centrum.cz>
Created attachment 56833 [details] [review] Bug 16952: Czech language definitions for sorting in Zebra Test plan: 1) Apply patch 2) Create new instance with parameter --zebralang cs 3) Insert some record with basic latin characters and some with "czech" characters (for example: "č" - should be sorted after "c", "š" - should be sorted after "s") 4) Try to search in katalog (staff and opac) and sort by other field then relevance - title or author for instance 5) Records should be sorted correctly by Czech rules 6) Look at code and confirm it is ok Signed-off-by: radiuscz <radek.siman@centrum.cz> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> I did not test this patch, but trust in the author and signoffer
Pushed to master for 16.11, thanks Josef!
Pushed in 16.05. Will be in 16.05.06.