WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-16-2007, 08:29 AM
jenik jenik is offline
WebProWorld New Member
 

Join Date: Oct 2005
Location: Denmark
Posts: 10
jenik RepRank 0
Default Text comparison script

Hi,
I am looking for JavaScript or ASP code for text comparison.
The code should highlight differences between two texts by marking places in the new text that differ from the original text. The text can consist of few sentences.
I was unable to find solution online. I also try to write the code but I find it very complex.
Wikipedia is for example using such a code to compare versions of published articles.
Any help would be much appreciated.
__________________
Business Ideas Networking Forum
-Make your business ideas come true-
Reply With Quote
  #2 (permalink)  
Old 05-16-2007, 05:03 PM
Dubbya's Avatar
Dubbya Dubbya is offline
WebProWorld 1,000+ Club
 

Join Date: Nov 2006
Location: Steinbach, Manitoba, Canada
Posts: 1,165
Dubbya RepRank 3Dubbya RepRank 3
Default

You're correct. The code is complicated and won't be the least bit effective unless tied to a search engine.

If you're hoping to protect your published content, why not use the same method thousands of publishers, webmasters and writers use?

www.copyscape.com/

Good Hunting.
__________________
Printer ink, inkjet & toner cartridges in Canada
"Price-wise printing supplies"
inkjetOasis.ca
Reply With Quote
  #3 (permalink)  
Old 05-17-2007, 04:23 AM
jenik jenik is offline
WebProWorld New Member
 

Join Date: Oct 2005
Location: Denmark
Posts: 10
jenik RepRank 0
Default

Quote:
Originally Posted by Dubbya
If you're hoping to protect your published content, why not use the same method thousands of publishers, webmasters and writers use?
Dubbya, thanks for reply.
What I actually need is a comparison function that highlights changes members of BUSINESS IDEAS Forum make to their published postings. Copyscape is not suitable for this.
__________________
Business Ideas Networking Forum
-Make your business ideas come true-
Reply With Quote
  #4 (permalink)  
Old 05-17-2007, 03:57 PM
Dubbya's Avatar
Dubbya Dubbya is offline
WebProWorld 1,000+ Club
 

Join Date: Nov 2006
Location: Steinbach, Manitoba, Canada
Posts: 1,165
Dubbya RepRank 3Dubbya RepRank 3
Default

I see that your forum uses ASP, which uses an Access or SQL Database so the pages are scripted in vbScript.

This link shows you how to compare text strings using a built in vbScript function:

http://www.microsoft.com/technet/scr...5/hey0622.mspx

Here's another one from Haneng.com
http://www.haneng.com/lessons_10.asp

Learn more about strings at Code Tricks:
http://www.codetricks.com/printpage.php?id=14

Head over to www.w3schools.com where you'll find links to great tutorials and scripts in both vbScript and JavaScript.

http://www.w3schools.com/asp/asp_examples.asp

For more information, try a Google search for "vbScript string manipulation" or "javascript string manipulation".
__________________
Printer ink, inkjet & toner cartridges in Canada
"Price-wise printing supplies"
inkjetOasis.ca
Reply With Quote
  #5 (permalink)  
Old 05-18-2007, 06:10 AM
jenik jenik is offline
WebProWorld New Member
 

Join Date: Oct 2005
Location: Denmark
Posts: 10
jenik RepRank 0
Default

Hi Dubbya,

Thanks for links. I know about these functions in ASP. The problem is that text comparison is not the same as a simple string comparison. Of course I could create an array of separate words or sentence and compare those.
Unfortunately this will work only when the words are changed i.e. number of words stays the same. It won’t work if a word is missing or is inserted. In this case the script would have to be smart enough to look further into the text to see when the texts are the same again to determine what words were inserted of deleted. To find out when a word is missing, added or changed is easy. It is not easy to find how many words are missing or added and when the new text starts to match again the original text. I think this is beyond my coding skill.
__________________
Business Ideas Networking Forum
-Make your business ideas come true-
Reply With Quote
  #6 (permalink)  
Old 05-18-2007, 12:18 PM
Dubbya's Avatar
Dubbya Dubbya is offline
WebProWorld 1,000+ Club
 

Join Date: Nov 2006
Location: Steinbach, Manitoba, Canada
Posts: 1,165
Dubbya RepRank 3Dubbya RepRank 3
Default

Have you tried to find assistance through any of the ASP or vbScript forums?

Perhaps it's time to consider outsourcing the scripting to a professional web programmer.
__________________
Printer ink, inkjet & toner cartridges in Canada
"Price-wise printing supplies"
inkjetOasis.ca
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: comparison, script, text



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Search Engine Friendly URLs by vBSEO 3.0.0