[Bug 14457] New: Integrate LIBRIS spellchecking
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14457 Bug ID: 14457 Summary: Integrate LIBRIS spellchecking Change sponsored?: Sponsored Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Searching Assignee: eivin@sysmystic.com Reporter: eivin@sysmystic.com QA Contact: testopia@bugs.koha-community.org Sponsored-by: Halland County Library This enhancement will make it possible to turn on spellchecking that integrates with the LIBRIS API. It is a regional enhancement and it will be selectable by using a syspref. The enhancement will be implemented as "did you mean" that suggests keywords from the LIBRIS database depending on the search terms. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14457 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Eivin, I am wondering - a 'did you mean' would be helpful in general. Could this maybe made so that you easily hook it with other sources? We already have some features called similarly that are available under Administration > Did you mean? - maybe it could also fit in there as another option. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14457 Eivin Giske Skaaren <eivin@sysmystic.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #2 from Eivin Giske Skaaren <eivin@sysmystic.com> --- Hi Katrin, yes I will hook it into the did you mean that is already there. I am not sure if it is easy to make a general service that can be reused with other spellchecking APIs but I will look into it. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14457 --- Comment #3 from Eivin Giske Skaaren <eivin@sysmystic.com> --- Before I post the patch let me address the question about a general spellchecking/did you mean. There is already did you mean facilities to plug into and I also used the suggestionengine and made the spellchecker a plugin of that. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14457 --- Comment #4 from Eivin Giske Skaaren <eivin@sysmystic.com> --- Created attachment 40816 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40816&action=edit Bug 14457: Integrate LIBRIS spellchecking This patch makes it possible to configure LIBRIS spellchecker as a "did you mean" feature. When searching for a word or phrase and misspelling the query will be sent to LIBRIS and if they have a suggestion it will be shown in the yellow did you mean box in the results page. The API is not very quick so this type of implementation was chosen to not disrupt the real-time feeling of the search. To test: 1. Apply the patch. 2. Go to http://api.libris.kb.se/bibspell/, enter the koha servers IP and click on the "Generera nyckel" button. 3. Under "Nyckel" you can copy the value that looks like this: E47B44829E265607274B677BC17B8D78, and enter it into the LibrisKey syspref (cgi-bin/koha/admin/preferences.pl?tab=searching). 4. In cgi-bin/koha/admin/didyoumean.pl check the box for using the LIBRIS API. It is only implemented for OPAC. 5. Perform some searches: tset - Did you mean should suggest: test jeg är på smester - suggestion: jag är på semester dantes inferna - suggestion: dantes inferno -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14457 Eivin Giske Skaaren <eivin@sysmystic.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14457 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #5 from David Cook <dcook@prosentient.com.au> --- I like this idea! Locally, Prosentient has already implemented a "Did you mean" spellcheck plugin using a pre-existing dictionary. Perhaps I should have him take a look at this bug as well... By the way, I'll provide a bit of feedback about some things I noticed at a glance. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14457 --- Comment #6 from David Cook <dcook@prosentient.com.au> --- Comment on attachment 40816 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40816 Bug 14457: Integrate LIBRIS spellchecking Review of attachment 40816: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=14457&attachment=40816) ----------------------------------------------------------------- ::: opac/opac-search.pl @@ +189,4 @@
} if ($cgi->cookie("search_path_code")) { my $pathcode = $cgi->cookie("search_path_code"); + given ($pathcode)
We don't use the given/when construct in Koha... I also don't see why this change would be required here. It looks like it was included accidentally? @@ +578,4 @@
# This sorts the facets into alphabetical order if ($facets) { foreach my $f (@$facets) { + $f->{facets} = [ sort { uc($a->{facet_title_value}) cmp uc($b->{facet_title_value}) } @{ $f->{facets} } ];
This looks like it's outside the scope of this bug... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14457 --- Comment #7 from Eivin Giske Skaaren <eivin@sysmystic.com> --- Hi David, I actually did most of the work several weeks ago but regarding the two issues I think that I just followed the example/plugin that was there. I will take a look at it and re-upload tonight. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14457 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- The problem is that given-when is experimental and will spam the logs. It really needs to be rewritten to be an if-else-construct instead. And if there are more we should rewrite them as well. The facet change might just have slipped in by a rebase or something? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14457 --- Comment #9 from Eivin Giske Skaaren <eivin@sysmystic.com> --- It was indeed the rebase. I have reviewed my original commit and those 2 changes was not part of it. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14457 Eivin Giske Skaaren <eivin@sysmystic.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40816|0 |1 is obsolete| | --- Comment #10 from Eivin Giske Skaaren <eivin@sysmystic.com> --- Created attachment 40827 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40827&action=edit Bug 14457: Integrate LIBRIS spellchecking This patch makes it possible to configure LIBRIS spellchecker as a "did you mean" feature. When searching for a word or phrase and misspelling the query will be sent to LIBRIS and if they have a suggestion it will be shown in the yellow did you mean box in the results page. The API is not very quick so this type of implementation was chosen to not disrupt the real-time feeling of the search. To test: 1. Apply the patch. 2. Go to http://api.libris.kb.se/bibspell/, enter the koha servers IP and click on the "Generera nyckel" button. 3. Under "Nyckel" you can copy the value that looks like this: E47B44829E265607274B677BC17B8D78, and enter it into the LibrisKey syspref (cgi-bin/koha/admin/preferences.pl?tab=searching). 4. In cgi-bin/koha/admin/didyoumean.pl check the box for using the LIBRIS API. It is only implemented for OPAC. 5. Perform some searches: tset - Did you mean should suggest: test jeg är på smester - suggestion: jag är på semester dantes inferna - suggestion: dantes inferno Restored opac-search.pl -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14457 Zeno Tajoli <z.tajoli@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14457 Zeno Tajoli <z.tajoli@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |z.tajoli@cineca.it Status|Needs Signoff |Failed QA --- Comment #11 from Zeno Tajoli <z.tajoli@cineca.it> --- The avaible patch doesn't modify code in opac-search.pl or opac-search.tt. So in fact doesn't operate. Probalby same line missing. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14457 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm does it need to? It uses the "did you mean" plugin structure. did you test? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14457 Zeno Tajoli <z.tajoli@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14457 --- Comment #13 from Zeno Tajoli <z.tajoli@cineca.it> --- I do a an error on reading the code. I reset 'Needs Signoff'. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14457 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14457 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40827|0 |1 is obsolete| | --- Comment #14 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 45967 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45967&action=edit Bug 14457: Integrate LIBRIS spellchecking This patch makes it possible to configure LIBRIS spellchecker as a "did you mean" feature. When searching for a word or phrase and misspelling the query will be sent to LIBRIS and if they have a suggestion it will be shown in the yellow did you mean box in the results page. The API is not very quick so this type of implementation was chosen to not disrupt the real-time feeling of the search. To test: 1. Apply the patch. 2. Go to http://api.libris.kb.se/bibspell/, enter the koha servers IP and click on the "Generera nyckel" button. 3. Under "Nyckel" you can copy the value that looks like this: E47B44829E265607274B677BC17B8D78, and enter it into the LibrisKey syspref (cgi-bin/koha/admin/preferences.pl?tab=searching). 4. In cgi-bin/koha/admin/didyoumean.pl check the box for using the LIBRIS API. It is only implemented for OPAC. 5. Perform some searches: tset - Did you mean should suggest: test jeg är på smester - suggestion: jag är på semester dantes inferna - suggestion: dantes inferno Restored opac-search.pl Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Seems to work, of course I can't tell if it is giving me accurate suggestions :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14457 --- Comment #15 from David Cook <dcook@prosentient.com.au> --- Comment on attachment 45967 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45967 Bug 14457: Integrate LIBRIS spellchecking Review of attachment 45967: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=14457&attachment=45967) ----------------------------------------------------------------- ::: koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref @@ +222,5 @@
no: "don't search" - on all variations of the ISBN. Note that this preference has no effect if UseQueryParser is on. + API Keys: + - + - LIBRIS Spellcheking API key
There is a typo here, but perhaps QA can fix it? -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org