Home

Awesome

Question Generator

Learning to generate questions from text.<br> Blog on this project : </br> Link1 : https://software.intel.com/en-us/articles/using-natural-language-processing-for-smart-question-generation </br> Link2 : http://dynamichub.in/aditya/sqg/

Screen Shot

Strategy

Build

Build Project

Some details about the project has also been mentioned in procedure.txt file which lies in the home directory itself.

Install Python2.7`in your system
git clone https://github.com/adityasarvaiya/Automatic_Question_Generation.git
cd Automatic_Question_Generation 
pip install -r requirements.txt

if you have problem with dotenv package then uninstall dotenv and install python-dotenv

pip install nltk
python 
import nltk
nltk.download("punkt")
nltk.download("stopwords")
nltk.download("averaged_perceptron_taggepython r")

Build Stanford Parser & NER

The stanford models folder should looks like this:

- stanford-models/
    | - stanford-parser.jar
    | - stanford-parser-x-x-x-models.jar
    | - englishPCFG.ser.gz
    | - stanford-ner.jar
    | - stanford-ner-x-x-x.jar
    | - english.all.3class.distsim.crf.ser.gz

Environment Variables

Create environment variable file with: touch .env for configuration (in project root).

SENTENCE_RATIO = 0.05 #The threshold of important sentences

STANFORD_JARS=/path-to-your-stanford-models/stanford-models/
STANFORD_PARSER_CLASSPATH=/path-to-your-stanford-models/stanford-models/stanford-parser-x.x.x-models.jar

STANFORD_NER_CLASSPATH=/path-to-your-stanford-models/stanford-models/stanford-ner.jar

Important Variables

<table> <tr> <th>ID </th> <th>Variable Name </th> <th>Variable Location </th> <th>USE </th> </tr> <tr> <td>1</td> <td>SENTENCE_RATIO</td> <td>.env file</td> <td>Controls the ratio to sentence selection from given text. Range [0,1]</td> </tr> <tr> <td>2</td> <td>len(entities) > 7</td> <td>aqg/utils/gap_selection line 58</td> <td>It elemenates any sentence with more than 7 entities</td> </tr> </table>

[embed] https://github.com/adityasarvaiya/Automatic_Question_Generation/blob/master/project.pdf [/embed]