homepage Welcome to WebmasterWorld Guest from 54.161.175.231
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
String comparsion script/algorithm
String comparsion script/algorithm
hellboy




msg:3954371
 2:03 pm on Jul 17, 2009 (gmt 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!

 

andrewsmd




msg:3954532
 6:09 pm on Jul 17, 2009 (gmt 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.

NomikOS




msg:3954563
 7:03 pm on Jul 17, 2009 (gmt 0)

check similar_text()

hellboy




msg:3954571
 7:19 pm on Jul 17, 2009 (gmt 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!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved