Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update script.py #4

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Report.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
i have updated the script.py file and added MCQs from the dataset folder where few chapters are given, with the help of those chapter i made the script.py file
80 changes: 75 additions & 5 deletions script.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,78 @@
## Import all the dependent libraries
import os

import os

def get_mca_questions(context: str):
mca_questions = [“mca1”,”mca2”,”mca3”....]

return mca_questions
# Your code for question generation will go here
# Initialize an empty list to store your generated questions
mca_questions = []

# Generate questions based on the provided context
# You can use NLP techniques and libraries like spaCy, NLTK, or Transformers for more advanced question generation

# Example:
# For simplicity, let's add a placeholder question
question = {
"question_text": "Who was the first Mughal ruler?",
"options": ["Humaiu", "Akbar", "Jahangir", "Aurangazeb"],
"correct_answers": ["Correct answers: Aurangazeb"]
}

question = {
"question_text": "Bahadu Saha Zafar and his son arrested by?",
"options": ["Captain William Hawkins", "
General William Keeling", "Captain Hodson", "Muqarrab Khan"],
"correct_answers": ["Correct answers: captain Hodson"]
}

question = {
"question_text": " Why did the East India Company become the Diwan of Bengal in 1765??",
"options": ["A. The Mughal emperor appointed them.", "B. It was a majestic occasion in a grand setting", "C. Robert Clive commissioned a painting to commemorate the event.", " D. The Company wanted to become a financial administrator."],
"correct_answers": ["Correct answers:A, C"]
}

question = {
"question_text": " What did the Company have to consider as the Diwan of Bengal?",
"options": [" A. Buying products it needed.", " B. Selling what it wanted.", "C. Administering the land.", " D. Organizing revenue resources."],
"correct_answers": [Correct answers: A, B, C, D"]
}




question = {
"question_text": "Why did the British focus on expanding the cultivation of crops in India?",
"options": [" A. To meet the growing expenses of the company..", " B. To ensure a regular revenue income.", " C. To fulfill the demands of European markets.", " D. To address the issue of famine."],
"correct_answers": [Correct answers: A, B, C"]
}
question = {
"question_text": "What was the primary reason for the British demand for Indian indigo?",
"options": [" A. The quality of indigo produced in India.", " B. The collapse of indigo supplies from the West Indies and America", "What issues did the ryoti system of indigo cultivation face?", "D. The availability of woad in Europe."],
"correct_answers": [Correct answers: A, B, C"]
}
question = {
"question_text": "Why did the Company struggle to expand indigo cultivation under the nij system?",
"options": [" A. Buying products it needed.", " B. Selling what it wanted.", " B. The collapse of indigo supplies from the West Indies and America, "D. The availability of woad in Europe.
"],
"correct_answers": [Correct answers: A, B, C"]
}
question = {
"question_text": " What did the Company have to consider as the Diwan of Bengal?",
"options": [" A. The fertile lands were already densely populated.", " B. Labour was needed when peasants were busy with rice cultivatior", " C. Planters had difficulty acquiring large, compact plots of land..", " C. Planters had difficulty acquiring large, compact plots of land.."],
"correct_answers": [Correct answers: A, B, C, D"]
}

question = {
"question_text": "What issues did the ryoti system of indigo cultivation face? ",
"options": ["A. Ryots were not willing to sign contracts.", " B. Indigo exhausted the soil rapidly, "C. The price for indigo was low.", " C. Planters had difficulty acquiring large, compact plots of land."," D. The planters insisted on cultivating indigo on the best soils."],
"correct_answers": [Correct answers: "B, C"]
}

# Append the question to the list
mca_questions.append(question)

return mca_questions

# Example usage:
context_text = "This is an example context from the textbook."
generated_questions = get_mca_questions(context_text)
print(generated_questions)