I have two paragraphs of text, one is saved in a file while the other is the piece entered by a user willing to write the same actual paragraph. Now I want to compare the two and tell the user how efficient was he to copy the same paragraph. Any techniques on how to do it ?
I was thinking of these issues which make it complex.
- What if the user spelled a word wrong
- What if the user skipped a word in between
- What if the user skipped two words and the rest of the text is same.
Do a diff on the input and the file, there is a javascript library for that here
http://code.google.com/p/google-diff-match-patch/ will tell you exactly what is different then you can use this information to determine efficiency of copy