PHP Classes

There is problem if i delete any word which is exist into next l

Recommend this page to a friend!

      PHP Text Diff Highlight class  >  All threads  >  There is problem if i delete any...  >  (Un) Subscribe thread alerts  
Subject:There is problem if i delete any...
Summary:There is problem if i delete any word which is exist into next l
Messages:5
Author:nit kumar
Date:2014-02-11 11:19:38
Update:2014-02-23 06:46:10
 

  1. There is problem if i delete any...   Reply   Report abuse  
Picture of nit kumar nit kumar - 2014-02-11 11:19:38
Hi,


There is problem if i delete any word which is exist into next line then it shows wrong difference.

for example, in below paragraph, i just delete first 'the' word then diff return wrong result.

"Despite all the fancy and exotic tools it employs, technical analysis really just studies supply and demand in a market in an attempt to determine what direction, or trend, will continue in the future. In other words, technical analysis attempts to understand the emotions in the market by studying the market itself, as opposed to its components. If you understand the benefits and limitations of technical analysis, it can give you a new set of tools or skills that will enable you to be a better trader or investor."

Can you please resolve this?

  2. Re: There is problem if i delete any...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2014-02-12 04:11:12 - In reply to message 1 from nit kumar
Can you post the text with the exact word deleted?

  3. Re: There is problem if i delete any...   Reply   Report abuse  
Picture of nit kumar nit kumar - 2014-02-12 09:07:53 - In reply to message 2 from Manuel Lemos
In this statement.

"Despite all the fancy and exotic tools it employs, technical analysis really just studies supply and demand in a market in an attempt to determine what direction, or trend, will continue in the future. In other words, technical analysis attempts to understand the emotions in the market by studying the market itself, as opposed to its components. If you understand the benefits and limitations of technical analysis, it can give you a new set of tools or skills that will enable you to be a better trader or investor."

I have deleted first 'the' and this statement become:

"Despite all fancy and exotic tools it employs, technical analysis really just studies supply and demand in a market in an attempt to determine what direction, or trend, will continue in the future. In other words, technical analysis attempts to understand the emotions in the market by studying the market itself, as opposed to its components. If you understand the benefits and limitations of technical analysis, it can give you a new set of tools or skills that will enable you to be a better trader or investor."

Then, diff should point out deleted the but it shows wrong result.

Please check it out.

  4. Re: There is problem if i delete any...   Reply   Report abuse  
Picture of nit kumar nit kumar - 2014-02-18 07:53:32 - In reply to message 3 from nit kumar
Got any solution Sir?

  5. Re: There is problem if i delete any...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2014-02-23 06:46:10 - In reply to message 4 from nit kumar
Sorry for the delay. I need more time to investigate this.

The class uses an algorithm to solve longest common subsequence problem but the implementation does not give good results when the text that you delete is repeated again in the text.

en.wikipedia.org/wiki/Longest_commo ...

I will look into this further to see if I can find what I am missing. Just let me know if you find out anything. Meanwhile please be patient.