Automatic Questions Generator is a powerful natural language processing tool that automates the process of generating questions from given text or content. It leverages advanced algorithms to analyze the input and extract relevant information, forming a variety of question types, such as multiple-choice, true/false, fill-in-the-blank, and open-ended questions. This tool finds applications in educational settings, content creation, and assessment preparation, saving time and effort by eliminating the need for manual question creation.
Screenshots
Here are some screenshots of the Automatic Questions Generator in action:
-
User Interface:
Description: This screenshot shows the graphical user interface of the Automatic Questions Generator. Users can input the text in the provided text area and click on the "Generate Questions" button to initiate question generation.
-
Input Text:
Description: This screenshot displays the text that the user has provided as input to the Automatic Questions Generator. The tool will analyze this text to generate questions.
-
Generated Questions:
Description: This screenshot showcases a sample of the questions generated by the tool based on the provided input text. The questions include multiple-choice, fill-in-the-blank, and open-ended question types.
Note: The screenshots provided here are for illustrative purposes only and may not represent the actual user interface or content generated by the Automatic Questions Generator. The appearance and output may vary based on the specific version and configuration of the tool.
Getting Started
Follow these steps to get started with the Automatic Questions Generator:
1. Install Dependencies
Before running the Automatic Questions Generator, make sure you have the required dependencies installed. You can do this by executing the following command in your terminal or command prompt:
pip install -r requirements.txt2. Install wkhtmltopdf
The Automatic Questions Generator uses wkhtmltopdf to convert HTML content into PDF format. Depending on your operating system, follow the instructions below to install wkhtmltopdf:
-
Windows:
- Download the Windows installer for
wkhtmltopdffrom the official website: https://wkhtmltopdf.org/downloads.html - Run the installer and follow the on-screen instructions to complete the installation.
- Download the Windows installer for
-
Mac OS X:
-
Install
wkhtmltopdfusing Homebrew (if you don't have Homebrew, install it from https://brew.sh/):brew install --cask wkhtmltopdf
-
-
Linux:
-
For Ubuntu/Debian-based distributions:
-
Install the necessary dependencies:
sudo apt-get update sudo apt-get install -y wkhtmltopdf
-
-
For CentOS/Fedora-based distributions:
-
Install the necessary dependencies:
sudo yum install -y wkhtmltopdf
-
-
3. Download Model (First Time Only)
Upon running the Automatic Questions Generator for the first time, you will need to download the language model used for question generation. To do this, run the first_time.py script:
python first_time.pyThis script will automatically download and set up the necessary language model for the Automatic Questions Generator.
4. Run the Automatic Questions Generator
After installing the dependencies, wkhtmltopdf, and downloading the model, you are now ready to use the Automatic Questions Generator. You can utilize it by running the main script or integrating it into your own Python projects.
python main.py5. Provide Input Text
The Automatic Questions Generator will prompt you to input the text from which you want to generate questions. You can either provide a file path containing the text or directly paste the text into the command-line interface.
6. Generate Questions
Once the input text is provided, the Automatic Questions Generator will analyze the content and generate various types of questions based on the information present. The questions will be displayed on the screen or saved to a file, depending on the configuration.
7. Explore and Utilize
Congratulations! You have successfully generated questions using the Automatic Questions Generator. Feel free to explore the generated questions, refine the input text for different outputs, and integrate this tool into your educational or content creation workflows to automate the question generation process. Happy questioning!
Below are the details of all the requirements (dependencies) for the Automatic Questions Generator:
-
pandas
- Description: pandas is a popular Python library for data manipulation and analysis. It provides data structures like DataFrame and Series, making it easier to handle and process structured data.
- Purpose: The Automatic Questions Generator may use pandas to manage and organize data during the question generation process.
-
regex
- Description: regex (regular expressions) is a powerful tool for pattern matching and text processing. It allows for sophisticated string matching and manipulation.
- Purpose: The Automatic Questions Generator might use regex to extract relevant information or patterns from the input text.
-
parrot
- Description: Parrot is a Python library that provides an interactive command-line interface for easily taking user inputs and displaying messages.
- Purpose: The Automatic Questions Generator could use parrot to interact with the user, prompting them to input the text from which questions will be generated.
-
jinja2
- Description: Jinja2 is a modern and widely-used template engine for Python. It allows the separation of Python code and presentation templates, making it easier to generate dynamic content.
- Purpose: The Automatic Questions Generator may use Jinja2 to format and structure the generated questions into various templates for presentation or output.
-
pdfkit
- Description: pdfkit is a Python library that allows the conversion of HTML or Markdown content to PDF format.
- Purpose: The Automatic Questions Generator might utilize pdfkit to save the generated questions as a PDF file for easier distribution or sharing.
-
tkinter
- Description: Tkinter is the standard GUI (Graphical User Interface) library for Python. It provides widgets and tools to create interactive graphical applications.
- Purpose: The Automatic Questions Generator could use tkinter to create a user-friendly graphical interface for users to input text and view the generated questions visually.
These requirements are essential for the proper functioning of the Automatic Questions Generator. Ensure that you have these packages installed, and their respective versions (as specified in the requirements.txt or as compatible with the tool) to avoid any compatibility issues or errors during the execution of the application.
The Automatic Questions Generator comes equipped with a range of powerful features designed to streamline the process of question generation from text content. Here are the key features of this tool:
-
Automatic Question Generation: The tool automatically analyzes the provided input text and generates a variety of well-structured questions based on the content. This eliminates the need for manual question creation and saves valuable time.
-
Multiple Question Types: The generator can create different types of questions, including multiple-choice, true/false, fill-in-the-blank, and open-ended questions. This provides a diverse set of question formats suitable for various learning and assessment scenarios.
-
Customizable Question Templates: Users can customize the question templates according to their specific requirements. The tool allows flexibility in formatting, layout, and wording, enabling tailored question presentation.
-
Natural Language Processing (NLP) Capabilities: Leveraging advanced NLP algorithms, the generator ensures that questions are contextually relevant and accurately extracted from the input text.
-
User-Friendly Interface: The tool features a user-friendly graphical interface that allows users to input text easily and view the generated questions effortlessly.
-
Export to PDF: The generated questions can be exported to PDF format, making it convenient to save, print, or share with others.
-
Integration Support: The Automatic Questions Generator can be seamlessly integrated into other Python projects or educational platforms, extending its usability in diverse applications.
-
Educational and Content Creation Applications: The tool finds applications in education, content creation, e-learning platforms, quizzes, and test preparation, making it valuable for educators, content creators, and students alike.
-
First-Time Setup: The tool performs a one-time setup process to download and configure the required language model, ensuring smooth functioning on initial use.
-
Cross-Platform Compatibility: The Automatic Questions Generator is compatible with Windows, macOS, and Linux operating systems, making it accessible to users across different platforms.
With these features, the Automatic Questions Generator offers a powerful and efficient solution for automating the question generation process, enhancing productivity, and promoting engaging learning experiences.
Usage
-
Prepare Input CSV: Create a CSV file containing the required data for question generation. The CSV should have the following columns with their respective data types:
Column Data Type Description sno int Serial number for each question. question string The main question text. a string Option A for the multiple-choice question. b string Option B for the multiple-choice question. c string Option C for the multiple-choice question. d string Option D for the multiple-choice question. answer string The correct answer (A, B, C, or D) for the multiple-choice question or the complete answer for other question types. level string The difficulty level of the question. Should be one of 'easy', 'medium', or 'hard'. ref string Reference or source information for the question (optional). -
Place CSV in the Sample Question Folder: Copy or move your prepared CSV file into the "sample_question" folder provided with the Automatic Questions Generator.
-
Edit CSV Name in
app.py: Open theapp.pyfile in the Automatic Questions Generator directory and modify the variableinput_csv_filenameto match the name of your CSV file. -
Run the Generator: Run the Automatic Questions Generator by executing the following command in your terminal or command prompt:
python main.py
-
Generate Questions: The tool will read the CSV file, process the data, and generate questions based on the provided information. It will output the questions in the desired formats (e.g., multiple-choice, true/false, fill-in-the-blank) depending on the content in the CSV.
-
Save Output: The generated questions can be saved to a PDF file for easy distribution and reference.
-
Explore and Review: Examine the generated questions and verify their correctness and relevance. If needed, adjust the input CSV data or templates to fine-tune the question generation process.
-
Integration: For integration into other projects or educational platforms, use the Automatic Questions Generator's functions and APIs to programmatically generate questions.
By following these steps, you can effectively utilize the Automatic Questions Generator to automate the process of generating questions from the CSV data, providing a versatile and efficient solution for educational and content creation purposes.
Contributing
We welcome contributions from the community to enhance and improve the Automatic Questions Generator. Whether you are a developer, educator, or enthusiast, you can contribute in various ways to make the tool even better. Here's how you can get involved:
-
Bug Reports: If you come across any bugs or issues while using the Automatic Questions Generator, please report them on the project's issue tracker. Provide detailed information about the problem, including steps to reproduce it and the expected behavior.
-
Feature Requests: If you have ideas for new features or improvements, feel free to suggest them on the issue tracker as well. We value your input and will consider all relevant and constructive feature requests.
-
Code Contributions: If you are a developer, you can contribute to the project by submitting pull requests. Fork the repository, make your changes, and create a pull request with a clear explanation of the changes you have made.
-
Documentation: Clear and comprehensive documentation is crucial for the project's usability. Help improve the documentation by fixing errors, adding explanations, and providing examples.
-
Testing: Thorough testing ensures the stability and reliability of the tool. You can contribute by writing test cases and running tests to verify the correctness of the code.
-
Translations: If you are proficient in multiple languages, you can help translate the user interface or documentation into other languages, making the tool more accessible to a global audience.
-
Spread the Word: Share the Automatic Questions Generator with others in the community. You can write blog posts, tutorials, or videos about the tool, helping more people discover and benefit from it.
-
Provide Feedback: Your feedback is valuable to us. If you have used the Automatic Questions Generator, share your experiences and suggestions to help us understand its strengths and areas of improvement.
How to Contribute
- Fork the repository and create a new branch for your contributions.
- Make the necessary changes and improvements in your branch.
- Ensure your code adheres to the project's coding guidelines and style.
- Write unit tests for new features or changes.
- Commit your changes and push them to your forked repository.
- Submit a pull request to the main repository, clearly explaining the changes you have made and the purpose of your contribution.
I will review your contributions and work with you to ensure the integration of valuable additions to the Automatic Questions Generator. Thank you for contributing to the project and helping the community benefit from this powerful tool!
License
The Automatic Questions Generator is released under the BSD 3-Clause License.
BSD 3-Clause License:
BSD 3-Clause License
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Explanation of the BSD 3-Clause License:
The BSD 3-Clause License is a permissive open-source license that allows users to freely use, modify, and distribute the software, subject to certain conditions. The license grants users the right to use the software without any warranty. Users can redistribute the software in both source and binary forms, with or without modifications, as long as the BSD 3-Clause License and copyright notice are retained. Additionally, any endorsements or promotions of products derived from the software require specific written permission from the copyright holder.
The BSD 3-Clause License is popular in the open-source community for its simplicity and flexibility, encouraging code reuse and collaboration while providing basic legal protection to the original authors.


%20copy.png)