Commit 9cd70797 by Vik Paruchuri

Fix annoying score problem

parent fd8d2888
...@@ -219,6 +219,7 @@ class FeatureExtractor(object): ...@@ -219,6 +219,7 @@ class FeatureExtractor(object):
#Iterate through essays and create a feedback dict for each #Iterate through essays and create a feedback dict for each
all_feedback=[] all_feedback=[]
for m in xrange(0,len(e_set._text)): for m in xrange(0,len(e_set._text)):
#Be very careful about changing these messages!
individual_feedback={'grammar' : "Grammar: Ok.", 'spelling' : "Spelling: Ok.", individual_feedback={'grammar' : "Grammar: Ok.", 'spelling' : "Spelling: Ok.",
'topicality' : "Topicality: Ok.", 'markup_text' : "", 'topicality' : "Topicality: Ok.", 'markup_text' : "",
'prompt_overlap' : "Prompt Overlap: Ok.", 'prompt_overlap' : "Prompt Overlap: Ok.",
...@@ -253,7 +254,7 @@ class FeatureExtractor(object): ...@@ -253,7 +254,7 @@ class FeatureExtractor(object):
if f_row_prop<(self._mean_f_prop/1.5) or len(e_set._text[m])<20: if f_row_prop<(self._mean_f_prop/1.5) or len(e_set._text[m])<20:
individual_feedback['topicality']="Topicality: Essay may be off topic." individual_feedback['topicality']="Topicality: Essay may be off topic."
if(features[m,9]>.5): if(features[m,9]>.6):
individual_feedback['prompt_overlap']="Prompt Overlap: Too much overlap with prompt." individual_feedback['prompt_overlap']="Prompt Overlap: Too much overlap with prompt."
log.debug(features[m,9]) log.debug(features[m,9])
......
...@@ -64,7 +64,7 @@ def grade(grader_data,grader_config,submission): ...@@ -64,7 +64,7 @@ def grade(grader_data,grader_config,submission):
if not has_error: if not has_error:
if(len(feedback['prompt_overlap'])>4): if(len(feedback['prompt_overlap'])>20):
results['score']=0 results['score']=0
results['correct']=False results['correct']=False
......
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