Give two paragraphs of text, how to compare?
is how to give two paragraphs of text, you can like Word's review function, marked the modification process, or similar to dictation after the correction process, compared to two strings (paragraphs) between the insertion, modification (character-based), delete function. The GitHub paradigm is good, but it doesn't seem like the smallest edits, not word-by-phrase manipulation.
As an example:
The 1th sentence: why I Cann ' t changed it. Becuase we can ' t.
The 2nd sentence: Why do we can ' t change it now? Because you can.
The program can compare the two sentences, find the difference, automatically skip the same parts, mark out the different places.
How does PHP implement this algorithm? Give a score at the same time. Does it have to do with the editing distance? Search keywords are: PHP diff? Or the Compare strings?
Take Hujiang as an example: Http://ting.hujiang.com/mansu ...
Feel Https://github.com/kijtra/tex ... This algorithm is less useful than Hujiang: