- Demo
- Overview
- Motivation
- Technical Aspect
- Pipeline
- Installation
- Run
- Directory Tree
- To Do
- Technologies Used
- License
Link: http://35.224.236.92:5000/
This is the Web App that is being developed by using Flask, Machine Learning, Docker, hosted on GCP instance and focus on providing teachers with automatic mcq generationing system for the given article or passage.
I wanted to develop something that can utilize all of my learnings and also has little bit of uniqueness as well. So, after randomly looking at my younger brother's(5th standard) assignment regarding answering MCQ of given passage, I decided to automate the generation of MCQ in order to make the task of teachers little easy.
This project is divided into four part:
- Building the core of the app using Natural Language Processing, Wordnet and ConceptNet.
- Desiging the frontend with the help of HTML, CSS, JavaScript(Done By Shubhankar).
- Building Flask API and Containerizing with the help of Docker.
- Deploying the whole Web App on Google Cloud Platform.
- Used e2-medium VM instance with 2 vcpus and 4 gb ram.
- will use domain for static ip in future.
How MCQ queations along with wrong answer choice are generated?
- Firstly the user provide text and choose to generate MCQ from Full Text or Summary.
- Proper Noun words are extracted as keywords from text.
- If user selects Summary then we use Transformer model to generate summary and select respective keywords.
- Respective Sentences are selected of gien keywords.
- Word sense is calculated with pwysd library for WordNet.
- Related options (From same parent class) are extracted and if not found in Wordnet then ConceptNet(PartOf) is used.
- Keyword is replaced with ______ and data is return as response.
The Code is written in Python 3.8. If you don't have Python installed you can find it here. If you are using a lower version of Python you can upgrade using the pip package, ensuring you have the latest version of pip. To install the required packages and libraries, run this command in the project directory after cloning the repository:
pip install -r requirements.txt
To run the app in a local machine, shoot this command in the project directory:
python Flask_api.py
Note:- It may download some of the required data on first run.
MCQ_Generator/
├── Dockerfile
├── extract_keywords.py
├── find_sentances.py
├── Flask_api.py
├── generate_summary.py
├── gen_mcq.py
├── KeyNotes.txt
├── README.md
├── requirements.txt
├── response.json
├── static
│ ├── ai.svg
│ ├── arrow.svg
│ ├── get mcq group.svg
│ ├── input_data.svg
│ ├── script.js
│ └── style.css
├── summary_notebook.ipynb
├── templates
│ └── index.html
└── test_articles
├── article.txt
├── Egypt.txt
└── The Indus River Valley Civilizations.txt
Using Abstract Summarization in order to produce difficullt multiple choice questions.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.