Commit b3bbeec3 by Vik Paruchuri

fix markup issues

parent 0cbcc202
......@@ -205,7 +205,7 @@ class FeatureExtractor(object):
all_feedback=[]
for m in xrange(0,len(e_set._text)):
individual_feedback={'grammar' : "Ok.", 'spelling' : "Ok.", 'topicality' : "Ok.", 'markup_text' : ""}
markup_tokens=nltk.word_tokenize(e_set._markup_text[m])
markup_tokens=e_set._markup_text[m].split(" ")
bad_pos_starts=[z[0] for z in bad_pos_positions[m]]
bad_pos_ends=[z[1]-1 for z in bad_pos_positions[m]]
for z in xrange(0,len(markup_tokens)):
......
I didn't know
\ No newline at end of file
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
......@@ -88,7 +88,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)
markup_string=re.sub(sub_comp," .." + incorrect_words[i] + ".. ", markup_string)
markup_string=re.sub(sub_comp," {{" + incorrect_words[i] + "}} ", markup_string)
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