Commit 2d2838a9 by Vik Paruchuri

fix grammar error detection

parent e291f7ee
......@@ -180,7 +180,7 @@ class FeatureExtractor(object):
in order to get off topic feedback.
Returns a list of lists (one list per essay in e_set)
"""
modifier_ratio=1.1
modifier_ratio=1.05
set_grammar=self._get_grammar_errors(e_set._pos,e_set._text,e_set._tokens)
set_grammar_per_character=[set_grammar[m]/float(len(e_set._text[m])) for m in xrange(0,len(e_set._text))]
set_spell_errors_per_character=[e_set._spelling_errors[m]/float(len(e_set._text[m])) for m in xrange(0,len(e_set._text))]
......
,vik,vikp,02.11.2012 17:19,file:///home/vik/.config/libreoffice/3;
\ No newline at end of file
This experement didn't have a controle and the grupe didn't do multiple triles. You would also may need to know what tempriture the rome is.
{"grader":"tests/models/essay_set_1.p"}
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.
......@@ -38,7 +38,9 @@ def send(payload, answer):
print "Request error:{0},{1},{2}".format(r.headers,payload,answer)
parsed_text=json.loads(r.text)
print(parsed_text)
print("\nAnswer: {0}\nScore: {1} Correct: {2} \nFeedback: {3}"
.format(answer,parsed_text['score'],parsed_text['correct'],
parsed_text['feedback']))
#print "Score:{0} {1}".format(parsed_text['score'],parsed_text['correct'])
return r.text
......@@ -97,12 +99,12 @@ def check(dirname,type):
payload = json.dumps({'grader': os.path.abspath(graders[0])})
for name in globs(dirname, 'answer*.txt', 'right*.py'):
print "Checking correct response from {0}".format(name)
#print "Checking correct response from {0}".format(name)
answer = contents(name)
right=check_right(send(payload, answer))
for name in globs(dirname, 'wrong*.txt'):
print "Checking wrong response from {0}".format(name)
#print "Checking wrong response from {0}".format(name)
answer = contents(name)
wrong=check_wrong(send(payload, answer))
if(type=="test"):
......
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