<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Did you mean&#8230; ? In php</title>
	<atom:link href="http://urbanoalvarez.es/blog/2008/05/30/did-you-mean-in-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://urbanoalvarez.es/blog/2008/05/30/did-you-mean-in-php/</link>
	<description>Words from Alejandro U. Alvarez</description>
	<lastBuildDate>Tue, 07 Feb 2012 01:24:40 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: alex</title>
		<link>http://urbanoalvarez.es/blog/2008/05/30/did-you-mean-in-php/comment-page-1/#comment-600</link>
		<dc:creator>alex</dc:creator>
		<pubDate>Tue, 03 Jun 2008 19:23:44 +0000</pubDate>
		<guid isPermaLink="false">http://urbanoalvarez.es/blog/?p=162#comment-600</guid>
		<description>Well that might be indeed a better solution, although I would like to test both with several different terms and cases and note down results and processing time to ensure what is the best way to approach this.
Your might be better, although for normal sites that don&#039;t really need that good search engines I guess it would be easier for them to run the MySQL query using SOUNDEX() and the soundex key of the input word...

Thanks for that ;)</description>
		<content:encoded><![CDATA[<p>Well that might be indeed a better solution, although I would like to test both with several different terms and cases and note down results and processing time to ensure what is the best way to approach this.<br />
Your might be better, although for normal sites that don&#8217;t really need that good search engines I guess it would be easier for them to run the MySQL query using SOUNDEX() and the soundex key of the input word&#8230;</p>
<p>Thanks for that <img src='http://urbanoalvarez.es/blog/wp-content/plugins/smilies-themer/kopete/wink.png' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ali asaria</title>
		<link>http://urbanoalvarez.es/blog/2008/05/30/did-you-mean-in-php/comment-page-1/#comment-598</link>
		<dc:creator>ali asaria</dc:creator>
		<pubDate>Tue, 03 Jun 2008 02:43:12 +0000</pubDate>
		<guid isPermaLink="false">http://urbanoalvarez.es/blog/?p=162#comment-598</guid>
		<description>a better solution, in our work, was to make a custom dictionary. see:
http://www.indirecthit.com/2007/08/24/google-did-you-mean-on-search-pages-using-php-4/</description>
		<content:encoded><![CDATA[<p>a better solution, in our work, was to make a custom dictionary. see:<br />
<a href="http://www.indirecthit.com/2007/08/24/google-did-you-mean-on-search-pages-using-php-4/" rel="nofollow">http://www.indirecthit.com/2007/08/24/google-did-you-mean-on-search-pages-using-php-4/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alex</title>
		<link>http://urbanoalvarez.es/blog/2008/05/30/did-you-mean-in-php/comment-page-1/#comment-596</link>
		<dc:creator>alex</dc:creator>
		<pubDate>Mon, 02 Jun 2008 16:25:53 +0000</pubDate>
		<guid isPermaLink="false">http://urbanoalvarez.es/blog/?p=162#comment-596</guid>
		<description>@Sergei:
Nice!
Although I&#039;m not sure that they are using the best approach, since it is language-dependent, whereas I doubt Google actually performs a real spell check.
I am guessing it searches for similar words using one of the functions (Or altered versions of them) to get slighly variated words, and then performs searches also with them...

But you never know ;)</description>
		<content:encoded><![CDATA[<p>@Sergei:<br />
Nice!<br />
Although I&#8217;m not sure that they are using the best approach, since it is language-dependent, whereas I doubt Google actually performs a real spell check.<br />
I am guessing it searches for similar words using one of the functions (Or altered versions of them) to get slighly variated words, and then performs searches also with them&#8230;</p>
<p>But you never know <img src='http://urbanoalvarez.es/blog/wp-content/plugins/smilies-themer/kopete/wink.png' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sergei</title>
		<link>http://urbanoalvarez.es/blog/2008/05/30/did-you-mean-in-php/comment-page-1/#comment-595</link>
		<dc:creator>Sergei</dc:creator>
		<pubDate>Mon, 02 Jun 2008 14:23:09 +0000</pubDate>
		<guid isPermaLink="false">http://urbanoalvarez.es/blog/?p=162#comment-595</guid>
		<description>This is an example in Python, but very useful. http://norvig.com/spell-correct.html</description>
		<content:encoded><![CDATA[<p>This is an example in Python, but very useful. <a href="http://norvig.com/spell-correct.html" rel="nofollow">http://norvig.com/spell-correct.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jasper</title>
		<link>http://urbanoalvarez.es/blog/2008/05/30/did-you-mean-in-php/comment-page-1/#comment-567</link>
		<dc:creator>Jasper</dc:creator>
		<pubDate>Sat, 31 May 2008 20:59:32 +0000</pubDate>
		<guid isPermaLink="false">http://urbanoalvarez.es/blog/?p=162#comment-567</guid>
		<description>I had no idea there were such functions in PHP. Cheers for the article, I&#039;ll be using this in the near future!</description>
		<content:encoded><![CDATA[<p>I had no idea there were such functions in PHP. Cheers for the article, I&#8217;ll be using this in the near future!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: roScripts &#45; Webmaster resources and websites</title>
		<link>http://urbanoalvarez.es/blog/2008/05/30/did-you-mean-in-php/comment-page-1/#comment-563</link>
		<dc:creator>roScripts &#45; Webmaster resources and websites</dc:creator>
		<pubDate>Sat, 31 May 2008 14:15:06 +0000</pubDate>
		<guid isPermaLink="false">http://urbanoalvarez.es/blog/?p=162#comment-563</guid>
		<description>&lt;strong&gt;Did you mean&#x2026; ? In php &#124; Urbanos Blog...&lt;/strong&gt;

In a new website I am developing for a client I had to add the usual Did you mean      in the search results for her  Si I started thinking for the easiest...</description>
		<content:encoded><![CDATA[<p><strong>Did you mean&#x2026; ? In php | Urbanos Blog&#8230;</strong></p>
<p>In a new website I am developing for a client I had to add the usual Did you mean      in the search results for her  Si I started thinking for the easiest&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Did you mean… ? In php &#124; Programmers Blog</title>
		<link>http://urbanoalvarez.es/blog/2008/05/30/did-you-mean-in-php/comment-page-1/#comment-562</link>
		<dc:creator>Did you mean… ? In php &#124; Programmers Blog</dc:creator>
		<pubDate>Sat, 31 May 2008 12:17:54 +0000</pubDate>
		<guid isPermaLink="false">http://urbanoalvarez.es/blog/?p=162#comment-562</guid>
		<description>[...] http://urbanoalvarez.es/blog/2008/05/30/did-you-mean-in-php/  [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://urbanoalvarez.es/blog/2008/05/30/did-you-mean-in-php/ " rel="nofollow">http://urbanoalvarez.es/blog/2008/05/30/did-you-mean-in-php/ </a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alex</title>
		<link>http://urbanoalvarez.es/blog/2008/05/30/did-you-mean-in-php/comment-page-1/#comment-554</link>
		<dc:creator>alex</dc:creator>
		<pubDate>Fri, 30 May 2008 19:11:20 +0000</pubDate>
		<guid isPermaLink="false">http://urbanoalvarez.es/blog/?p=162#comment-554</guid>
		<description>Nice, thanks for the advice, I didn&#039;t know MySQL had that function. Then yes, use it directly, unless you want to use the metaphone function, which apparently isn&#039;t included yet in MySQL (There is &lt;a href=&quot;http://bugs.mysql.com/bug.php?id=7748&quot; rel=&quot;nofollow&quot;&gt;a request to have it included&lt;/a&gt; in following versions already)

Thanks for that, I&#039;ll update the post now to reflect that,
Alex</description>
		<content:encoded><![CDATA[<p>Nice, thanks for the advice, I didn&#8217;t know MySQL had that function. Then yes, use it directly, unless you want to use the metaphone function, which apparently isn&#8217;t included yet in MySQL (There is <a href="http://bugs.mysql.com/bug.php?id=7748" rel="nofollow">a request to have it included</a> in following versions already)</p>
<p>Thanks for that, I&#8217;ll update the post now to reflect that,<br />
Alex</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alex</title>
		<link>http://urbanoalvarez.es/blog/2008/05/30/did-you-mean-in-php/comment-page-1/#comment-553</link>
		<dc:creator>alex</dc:creator>
		<pubDate>Fri, 30 May 2008 19:07:44 +0000</pubDate>
		<guid isPermaLink="false">http://urbanoalvarez.es/blog/?p=162#comment-553</guid>
		<description>Well of course I wouldn&#039;t use Levenshtein for large volumes of data without some sort of index or cache as you say...
In case you want to do it with large dictionaries I would probably create a column with the soundex or metaphone keys and then search both for the string as-is and then for the soundex key.
Using it that way you could even display the percentage of closeness...

Probably i would say that Levenshtein is great for small sized databases, or array search. But for large scale search the soundex is just perfect.

Thanks for the correction,
Alex</description>
		<content:encoded><![CDATA[<p>Well of course I wouldn&#8217;t use Levenshtein for large volumes of data without some sort of index or cache as you say&#8230;<br />
In case you want to do it with large dictionaries I would probably create a column with the soundex or metaphone keys and then search both for the string as-is and then for the soundex key.<br />
Using it that way you could even display the percentage of closeness&#8230;</p>
<p>Probably i would say that Levenshtein is great for small sized databases, or array search. But for large scale search the soundex is just perfect.</p>
<p>Thanks for the correction,<br />
Alex</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tristan</title>
		<link>http://urbanoalvarez.es/blog/2008/05/30/did-you-mean-in-php/comment-page-1/#comment-547</link>
		<dc:creator>Tristan</dc:creator>
		<pubDate>Fri, 30 May 2008 16:11:18 +0000</pubDate>
		<guid isPermaLink="false">http://urbanoalvarez.es/blog/?p=162#comment-547</guid>
		<description>how big is the dictionary that you use? Levenshtein is O(mxn). you cant get much better for this sort of operation, but assuming that the input is 7 chars, and target string is an average length of 6, then we have 42 operations to determine its length. assuming a rather puny dictionary size of a 1000 words every page view/search will require 42000 operations?  that sort of math doesnt scale.


you may want to look at storing the results of each search in a dbms as a sort of long term cache.</description>
		<content:encoded><![CDATA[<p>how big is the dictionary that you use? Levenshtein is O(mxn). you cant get much better for this sort of operation, but assuming that the input is 7 chars, and target string is an average length of 6, then we have 42 operations to determine its length. assuming a rather puny dictionary size of a 1000 words every page view/search will require 42000 operations?  that sort of math doesnt scale.</p>
<p>you may want to look at storing the results of each search in a dbms as a sort of long term cache.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anna Kolesnik</title>
		<link>http://urbanoalvarez.es/blog/2008/05/30/did-you-mean-in-php/comment-page-1/#comment-546</link>
		<dc:creator>Anna Kolesnik</dc:creator>
		<pubDate>Fri, 30 May 2008 15:37:52 +0000</pubDate>
		<guid isPermaLink="false">http://urbanoalvarez.es/blog/?p=162#comment-546</guid>
		<description>cool and sweet tip .. I like you syntax highlighting plugin in the Wordpres abc :))</description>
		<content:encoded><![CDATA[<p>cool and sweet tip .. I like you syntax highlighting plugin in the Wordpres abc :))</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ryan</title>
		<link>http://urbanoalvarez.es/blog/2008/05/30/did-you-mean-in-php/comment-page-1/#comment-545</link>
		<dc:creator>ryan</dc:creator>
		<pubDate>Fri, 30 May 2008 15:36:49 +0000</pubDate>
		<guid isPermaLink="false">http://urbanoalvarez.es/blog/?p=162#comment-545</guid>
		<description>Wow, didn&#039;t even know these functions existed.  Thanks for the lowdown.</description>
		<content:encoded><![CDATA[<p>Wow, didn&#8217;t even know these functions existed.  Thanks for the lowdown.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Decowski</title>
		<link>http://urbanoalvarez.es/blog/2008/05/30/did-you-mean-in-php/comment-page-1/#comment-544</link>
		<dc:creator>Paul Decowski</dc:creator>
		<pubDate>Fri, 30 May 2008 15:34:32 +0000</pubDate>
		<guid isPermaLink="false">http://urbanoalvarez.es/blog/?p=162#comment-544</guid>
		<description>&quot;(...) already created a column in the mysql tables with the soundex key (...)&quot;
Or use SOUNDEX() function provided by MySQL.</description>
		<content:encoded><![CDATA[<p>&#8220;(&#8230;) already created a column in the mysql tables with the soundex key (&#8230;)&#8221;<br />
Or use SOUNDEX() function provided by MySQL.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.865 seconds -->

