Commit 709c160e by Vik Paruchuri

fix spell correction where wrong length was being returned

parent 2d2838a9
you would need many more pieces of information to replicate the experiment . you would need the type of samples to begin with in the procedure . you would also need to know the amount of vinegar used in each container . you would also need to know exactly how to mass the samples and what types of container to use plastic for example , might alter the results .
\ No newline at end of file
to replicate this experiment i would need to know how much vinegar to pour into the containers to insure each sample has to same amount to react to . i would need to also know which type of container to use .
\ No newline at end of file
the planners envisaged that a war with japan would have three phases while the garrison of singapore defended the fortress , the fleet would make its way from home waters to singapore , sally to relieve or recapture hong kong , and blockade the japanese home islands to force japan to accept terms . the idea of invading japan was rejected as impractical , but british planners did not expect that the japanese would willingly fight a decisive naval battle against the odds . aware of the impact of a blockade on an island nation at the heart of a maritime empire , they felt that economic pressure would suffice .
\ No newline at end of file
This is a well written string and everything is spelled correctly.
\ No newline at end of file
......@@ -87,7 +87,7 @@ def spell_correct(string):
sub_pat = r"\b" + incorrect_words[i] + r"\b"
sub_comp = re.compile(sub_pat)
newstring = re.sub(sub_comp, correct_spelling[i], newstring)
return newstring,len(incorrect)-1
return newstring,len(incorrect_words)
def ngrams(tokens, min_n, max_n):
......
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