<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Thanks Joe --<div> </div><div>I will see what I can discover and develop... May need some help in a bit though.</div><div><br></div><div>If anyone has any other ideas please send them along.</div><div><br></div><div>-Brendan</div><div><br></div><div><div><div>On Sep 3, 2008, at 4:52 PM, Joe Atzberger wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Since 2.4, Koha added Lingua::Ispell as a dependency, so if we're really just looking to make misspellings into valid strings in language X, the easiest implementation might be to use Ispell. <br><br>I like the idea of building target strings out of the MARC data, but that might be better addressed by using a script to extend the Ispell dictionary.<br> <br>--joe<br><br><div class="gmail_quote">On Wed, Sep 3, 2008 at 2:47 PM, Brendan Gallagher <span dir="ltr"><<a href="mailto:gallabr@biblio.org">gallabr@biblio.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div style="">Thanks for the lead Jesse --<div><br></div><div>I'll continue to mess around with these and see what I can develop.</div><div><br></div><font color="#888888"><div>-Brendan</div></font><div><div></div><div class="Wj3C7c"> <div><br><div><div>On Sep 3, 2008, at 2:44 PM, Jesse Weaver wrote:</div><br><blockquote type="cite"><div dir="ltr">On Wed, Sep 3, 2008 at 12:25 PM, Brendan Gallagher <span dir="ltr"><<a href="mailto:gallabr@biblio.org" target="_blank">gallabr@biblio.org</a>></span> wrote:<br> <div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Hi All -<br> <br> I've been snooping around in the make_spellcheck_suggest.pl perl<br> script and I've developed a few questions.<br> <br> Looks like the script was originally written for Koha 2.4 CVS and<br> hasn't quite been updated yet.<br> I've been working my way through updating the script (I'm on perl 5.10<br> and koha 3.1).<br> <br> Ok, my question is (or if someone has a better recommendation of a<br> different path I should be chasing or working towards developing)<br> <br> Could someone lead me to the new mysql database tables for marc_word<br> (or another equivalent) and correct me if I am wrong but I am equating<br> "marc_subfield_table" with the newer mysql table<br> marc_subfield_structure (plus i need to change subfieldvalue to either<br> tagfield or tagsubfield). Below is the current part of the script<br> that I am referencing,</blockquote><div><br>marc_subfield_structure is present in both versions, and is different from _table. It holds framework information (description of MARC subfields, and what they mean, like the title or author), rather than the values of those fields for any given record.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br> "<br> my $query_words = "SELECT DISTINCT word, COUNT(word) FROM marc_word";<br> my $query_marc_subfields = "SELECT DISTINCT subfieldvalue,<br> COUNT(subfieldvalue) FROM marc_subfield_table";<br> my $query_titles = "SELECT DISTINCT title, COUNT(title) FROM biblio<br> GROUP BY title";<br> my $query_authors = "SELECT DISTINCT author, COUNT(author) FROM biblio<br> GROUP BY author";<br> "<br> <br> I do have the fuzzy searching set for my opac --> but I am just<br> looking a little bit more (and some of my searches dealing with these<br> "spellcheck" suggestions are working - you can see that I have got it<br> to populate some information in mysql database).<br> <br> Here is a copy of the message I get when executing this script. and I<br> want to get ride of the "excute failed" -parts.<br> <br> Step 1 of 5: Checking to make sure suggest tables exist<br> Use of uninitialized value $_ in pattern match (m//) at<br> make_spellcheck_suggest.pl line 99.<br> All tables present ... moving along<br> Step 2 of 5: Deleting old data<br> Step 3 of 5: Creating non-distinct table from various Koha tables<br> Finished building marc_word list<br> Adding marc_word entries with the following tagsubfields:020a, 100a,<br> 110a, 130a, 240a, 245a, 245b, 245c, 245p, 246a, 246b, 440a, 440p,<br> 505t, 511a, 534a, 600a, 610a, 611a, 630a, 650a, 651a, 700a, 710a,<br> 730a, 740a, 800a, 830a,<br> DBD::mysql::st execute failed: Unknown column 'tagsubfield' in 'where<br> clause' at make_spellcheck_suggest.pl line 173.<br> DBD::mysql::st fetchrow_array failed: fetch() without execute() at<br> make_spellcheck_suggest.pl line 179.<br> 0 more records added...<br> Finished building marc_subfield_table list<br> Adding marc_subfield_table entries with the following tags and<br> subfields:020, a, 100, a, 110, a, 130, a, 240, a, 245, a, 245, b, 245,<br> c, 245, p, 246, a, 246, b, 440, a, 440, p, 505, t, 511, a, 534, a,<br> 600, a, 610, a, 611, a, 630, a, 650, a, 651, a, 700, a, 710, a, 730,<br> a, 740, a, 800, a, 830, a,<br> DBD::mysql::st execute failed: Table 'koha.marc_subfield_table'<br> doesn't exist at make_spellcheck_suggest.pl line 173.<br> DBD::mysql::st fetchrow_array failed: fetch() without execute() at<br> make_spellcheck_suggest.pl line 179.<br> 0 more records added...<br> 57708 more records added...<br> 83598 more records added...<br> Step 4 of 5: Deleting old distinct entries<br> Step 5 of 5: Creating distinct spellcheck table out of non-distinct<br> table<br> Finished: total distinct items added to spellcheck: 81520<br> </blockquote><div><br>Koha 3.0's new database schema does make this a bit harder; the script would have to parse the record from the biblioitems.marcxml or biblioitems.marc column, then find the words within that to add to the relevant tables.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br> <br> Thanks,<br> <br> +++++++++++++++++++++++++++++++++++++++++++<br> Brendan A. Gallagher<br> Software Services Coordinator<br> Bibliomation, INC.<br> Middlebury, CT 06516<br> <a href="http://www.biblio.org" target="_blank">http://www.biblio.org</a><br> (203)577-4070 x119<br> +++++++++++++++++++++++++++++++++++++++++++<br> <br> </blockquote></div><br>-- <br>Jesse Weaver<br>Software Developer, LibLime<br> </div></blockquote></div><br></div></div></div></div><br>_______________________________________________<br> Koha mailing list<br> <a href="mailto:Koha@lists.katipo.co.nz">Koha@lists.katipo.co.nz</a><br> <a href="http://lists.katipo.co.nz/mailman/listinfo/koha" target="_blank">http://lists.katipo.co.nz/mailman/listinfo/koha</a><br> <br></blockquote></div><br></div></blockquote></div><br></div></body></html>