Professional Documents
Culture Documents
String Difference Algorithm in C++: Meaning and Nature of Word Errors
String Difference Algorithm in C++: Meaning and Nature of Word Errors
(iii) For every addition of a word / figure not found in the passage.
(i) Spacing Errors : Where no space is provided between two words, e.g. ‘Ihope’ or undesired
space is provided between the words or letters of a word e.g. hope I have, ‘I hxxave’.
(ii) For every spelling error committed by way of repetition, or addition or transposition or
omission or substitution of a letter/letters, e.g. the word ‘spelling’ typed as ‘seeplings’ etc.
(iii) Wrong Capitalisation : Wrong use of capital letter for small letter and vice-versa. (This does
not apply to Hindi typewriting scripts).
Algorithm Inputs
1. Original Text
2. Text to compare
Algorithm Outputs
1. Simple HTML output of “Text to Compare” which shows
a. Full mistakes in the red color,
b. Half mistakes in blue color and
c. Correct words in green color
The HTML text output will be of string data type in C++ so it can be used
whenever required.
2. Result statistics which should be generated along with the above HTML output
separately
Number of totol words in original text
Number of total words in text to compare text
Number of Correct words and list of those words considered correct
Number of Mistakes and list of those words considered a mistake
o Full Mistakes
Ommission of words (Number count and word list)
Substitution/addition of word (Number count and word list)
o Half Mistakes
Spacing errors (Number count and word list)
Wrong capitalisation errors (Number count and word list)
Spelling errors (Number count and word list)
Once upon a time there was a crow. It was very thirsty. It flew here and
there in search of water.
Text to Compare
Once there was a crow. It was very thirsty. It flew here and there in the
search of water.
Once upon a time there was a crow. It was very thirsty. It flew here and
there in the search of water.
Once upon a time there was a crow. It was very thirsty. It flew here and
there in search of water.
Text to Compare
Once upon upon a time there was a crow. It was very thirsty. It flew here
and there in the search of water.
Once upon upon a time there was a crow. It was very thirsty. It flew here
and there in the search of water.
Case – 3 : Substitution Error (Full Mistake)
Original Text
Once upon a time there was a crow. It was very thirsty. It flew here and
there in search of water.
Text to Compare
Once upon a time there was a crow. There was a crow. It was very thirsty. It
flew here and there in search of water.
Once upon a time there was a crow. There was a crow. It was very thirsty. It
flew here and there in search of water.
Once upon a time there was a crow. It was very thirsty. It flew here and
there in search of water.
Text to Compare
Once upon a time there was a crow. He was very angry. It was very thirsty.
It flew here and there in search of water.
Once upon a time there was a crow. He was very angry. It was very thirsty.
It flew here and there in search of water.
Case – 5 : Incorrect word typed (Full Mistake)
Original Text
Once upon a time there was a crow. It was very thirsty. It flew here and
there in search of water.
Text to Compare
Once sdrt a time the was a crow. It was very thirsty. It flew here and there in
search of water.
Once sdrt a time the was a crow. It was very thirsty. It flew here and there in
search of water.
Once upon a time there was a crow. It was very thirsty. It flew here and
there in search of water.
Text to Compare
Once upon a time there was a crow. It flew here and there in search of
water.
Once upon a time there was a crow. It was very thirsty. It flew here and
there in search of water.
Case – 7 : Transpostion of characters in a word ( half mistake)
Original Text
Once upon a time there was a crow. It was very thirsty. It flew here and
there in search of water.
Text to Compare
Once upon a time there was a crow. It saw very thirsty. It flew here and
there in search of water.
Once upon a time there was a crow. It saw very thirsty. It flew here and
there in search of water.
Original Text
Once upon a time there was a crow. It was very thirsty. It flew here and
there in search of water.
Text to Compare
Once upon a time there was a crow. It was very thirsty. It flew here and
there in search of Water.
Once upon a time there was a crow. It was very thirsty. It flew here and
there in search of water.
Case – 9 : Spacing error ( half mistake)
Original Text
Once upon a time there was a crow. It was very thirsty. It flew here and
there in search of water.
Text to Compare
Once upon a time there was a crow. It w as very thirsty. It flew here and
there in search of water.
Once upon a time there was a crow. It w as very thirsty. It flew here and
there in search of water.
Once upon a time there was a crow. It was very thirsty. It flew here and
there in search of water.
Text to Compare
Once upon a time there was a crow. Itwas very thirsty. It flew here and
there in search of water.
Once upon a time there was a crow. Itwas very thirsty. It flew here and
there in search of water.
Case – 11 : Ommission of letter (half mistake)
Ommission of word is a full mistake but the ommission of letter in a word is considered half mistake.
Original Text
Once upon a time there was a crow. It was very thirsty. It flew here and
there in search of water.
Text to Compare
Once upon a time there was a crow. It was very thrsty. It flew here and
there in search of water.
Once upon a time there was a crow. It was very thrsty. It flew here and
there in search of water.
Original Text
Once upon a time there was a crow. It was very thirsty. It flew here and
there in search of water.
Text to Compare
Once upon a time there was a crow. It was very tharsty. It flew here and
there in search of water.
Once upon a time there was a crow. It was very tharsty. It flew here and
there in search of water.
Case – 13 : Ommission of punctuation mark like full stop, comma, question mark,
inverted comma etc. (half mistake)
Original Text
Once upon a time there was a crow. It was very thirsty. It flew here and
there in search of water.
Text to Compare
Once upon a time there was a crow It was very thirsty. It flew here and
there in search of water.
Once upon a time there was a crow It was very thirsty. It flew here and
there in search of water.