|
09-17-2003, 02:18 AM | #1 |
Purple Mole
Join Date: Sep 2003
Location: Kassel, Germany
Posts: 119
|
Nice to have: Dictionary
A very cool -but i think not easy- feature is a Dictionary if a search result is empty or < 2 or 3 hits.
See: Google - Did you mean: Are there free Dictionaries for all languages to use for this ? Is it possible ? -Roland- |
09-17-2003, 12:49 PM | #2 |
Green Mole
Join Date: Sep 2003
Location: Brest - France
Posts: 22
|
Perhaps that phpDig could propose some approching words from its "keywords" table ?
(And a little bit of code, using Aspell functions) In using the table "keywords", the proposed words are obligatorly known from phpDig. So, no second empty result in proposing known words... and no need of any dictonnary. The dictionary IS the site. Good idea ? or not ? Nicolas. |
09-17-2003, 04:13 PM | #3 | |
Purple Mole
Join Date: Sep 2003
Location: Kassel, Germany
Posts: 119
|
Quote:
Problem is: you need a search for ALL languages, and also special charakter in some language: á è and ä, ö, ü (french, german) :: Examples (ok some nonsense example ) :: Search: management operator - was not found, so phpdig: did you mean: manager operating Search: ranked - was not found, so phpdig: did you mean: ranking -- any words part begin, end and middle must found. Any other difficulty words ? -Roland- |
|
09-22-2003, 01:30 PM | #4 |
Purple Mole
Join Date: Sep 2003
Location: Kassel, Germany
Posts: 119
|
Perhaps i have easy solution for this:
:: SOUNDEX :: LOOK Here SOUNDEX - Calculates the soundex key of string. You must add a new table-field an insert all SOUNDEX of the keywords. Perhaps as new Link in Admin-Menu (generate alternate words) If Search-HIT < 1 or 2 -as $variable in config.php- you look at the sondex-table: For my example above: SOUNDEX(management) = M525 SOUNDEX(manager) = M526 Did you mean: is here near next >= M525 AND SOUNDEX(operator) = O163 SOUNDEX(operating) = O163 SOUNDEX(ranked) = R523 SOUNDEX(ranking) = R525 Did you mean: is here near next > R523 The soundex 'different letter in front' problem can be solved by using levenshtein() on the soundex codes. See first User Contributed Notes at my Llink above. OR direct in SQL LIKE: $sql = "SELECT * FROM keywords WHERE substring(soundex(keyword), 1, 4) = substring(soundex('".$search_string."'), 1, 4)"; Hmm, does this work ? -Roland- Last edited by Rolandks; 09-22-2003 at 02:26 PM. |
09-26-2003, 09:00 AM | #5 |
Purple Mole
Join Date: Sep 2003
Location: Kassel, Germany
Posts: 119
|
OKAY - NOW:
I have create as Testpage for this idea. Test-Search for (little) Intelligent Php-Dig Fuzzy Try this search: "autentication" "deskription" "hiperlinks" and other I find this a verry feature for phpDig and i hope get some feedback and Suggestions ! My plan is: - ideas to create better results - create a Tag: phpdig: phonetic - add phpdig: phonetic to index.php - add this to the templates as: do you mean: ... (in all languages) and display to 2 TOP-hits - add this seach to statistic --- found by phonetic ... Problems are: - different letter in front - problem - special language character: ü. ö, ä, ß - German "Straße" is in Database but "Strasse" isn't found anything (engl. street. - a little slow (perhaps create a Table-Field for SOUNDEX and add at indexing or a Link in Admin-Menu.
__________________
-Roland- :: Test PhpDig 1.6.2 here :: - :: Test-Search for (little) Intelligent Php-Dig Fuzzy :: Last edited by Rolandks; 09-26-2003 at 12:45 PM. |
09-26-2003, 10:09 AM | #6 |
Green Mole
Join Date: Sep 2003
Location: Brest - France
Posts: 22
|
Yeah !!
Excellent work. I did'nt even have enough time to work at my own on this feature (with Aspell or so). I have to look at your links. Very good ! |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Nice Job On The Forum Changes! | vinyl-junkie | The Mole Hole | 1 | 02-29-2004 09:23 AM |
Dictionary or something more complex? | damian | Mod Requests | 3 | 11-07-2003 08:42 AM |