Commit fe57f9a3 by Vik Paruchuri

fixed issue with multiple errors with same misspelling

parent c36d48d4
in order to replicate this experiment , i would need to know additional information such as the four different samples that they used because i could have choosen metal , carbboard and many other sample materials that they didn't use and would get different results . also i would also need to know the amount of vinegar to pour because this can caute a major change . lastly , they might want to tell where to sit the samples while they dry for minutes because if they are sitting in room temp . or by a light source makes a difference too .
\ No newline at end of file
in order for i for replicate this expirement i woukd need to know what are the reaserching with this expirement what kind of result are being booked at and the mass of each sample at the end of expirment theie results . i didn't know what the answer is .
\ No newline at end of file
......@@ -84,11 +84,15 @@ def spell_correct(string):
correct_spelling.append(sug)
newstring = string
markup_string = string
already_subbed=[]
for i in range(0, len(incorrect_words)):
sub_pat = r"\b" + incorrect_words[i] + r"\b"
sub_comp = re.compile(sub_pat)
newstring = re.sub(sub_comp, correct_spelling[i], newstring)
markup_string=re.sub(sub_comp," {{" + incorrect_words[i] + "}} ", markup_string)
if incorrect_words[i] not in already_subbed:
markup_string=re.sub(sub_comp," {{" + incorrect_words[i] + "}} ", markup_string)
already_subbed.append(incorrect_words[i])
return newstring,len(incorrect_words),markup_string
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment