Welcome to WebmasterWorld Guest from 54.144.107.83

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

String comparsion script/algorithm

String comparsion script/algorithm

     
2:03 pm on Jul 17, 2009 (gmt 0)

New User

5+ Year Member

joined:Mar 7, 2007
posts: 28
votes: 0


HI,

I have thousands products and would like to do some price komparsion between the same products
Looking for a solution which would compare these products/titles and point which of them are the same.

For example I have these two, they are the same but with different titles:

$title2= "SENCOR SDV 7112 SUPER SLIM DIVX 5.1";
$title3= "DVD player SENCOR SDV 7112";

I've tried array_intersect() but this is not giving me the right results, it is jus approx solution.

Is there any method/algorithm for this?

Thank you!

6:09 pm on July 17, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:June 10, 2008
posts: 1130
votes: 0


What do you mean the same? They have the same price? Can you post more code and an example of where you would want to to return true and two to return false? I could help you more with that.
7:03 pm on July 17, 2009 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 22, 2005
posts:185
votes: 0


check similar_text()
7:19 pm on July 17, 2009 (gmt 0)

New User

5+ Year Member

joined:Mar 7, 2007
posts: 28
votes: 0


@andrewsmd:
Saying that they are the same,I meant the products are the same bud with slightly different name, and I need to look up all the same products even if they have little bit different name, and comapare their prices.

For instance, you have 10 products in catalog from different stores (e-shops) which are the same but with little different names, as here:

$title2= "SENCOR SDV 7112 SUPER SLIM DIVX 5.1";
$title3= "DVD player SENCOR SDV 7112";

...and what I'm trying to do is pull out all the potential product which may be the same although they have slightly different names, and compare their prices.

I have some solution, which is giving me the % of similarity, but just wondering if there could be something more precise, any algorithm

Thank you!