kent0304 / short-answer-grader

An automatic short answer grader.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A Short Answer Grader

This is an automatic short answer grading system written in Python. Given a question, a correct reference answer and a student response, it computes a real-valued score for the student response based on its semantic similarity with the correct answer. This is the grader reported in the NAACL 2016 short paper Fast and Easy Short Answer Grading with High Accuracy (except the term weighting-based features). The directory contains a pretrained grader ( as well as source code for training a new one ( Each source file contains an actual example of grading a student response.


  1. NLTK
  2. Scikit-learn
  3. The Python wrapper for Stanford CoreNLP

Installation and Usage

  1. Make sure the requirements are installed.

  2. Change the statement "rel, left, right = map(lambda x: remove_id(x), split_entry)" in to "rel, left, right = split_entry".

  3. Download the grader:

    git clone

  4. Download the word embeddings by Baroni, Dinu, and Kruszewski from this link (the "Best predict vectors") and put the file in the Resources directory.

  5. Run the script to launch the server:


  6. To run the pretrained grader, run

  7. To train a new grader and apply to a test item, run

ezoic increase your site revenue


An automatic short answer grader.

License:GNU General Public License v3.0


Language:Python 94.7%Language:Roff 5.3%