Code Monkey home page Code Monkey logo

automatic-question-generator's Introduction

Automatic Question Generator

Automatic Question Generator from Text

Prerequisites

- Python 3.5+
- NLTK 
- SpaCy
- NumPy

Quickstart (main.py)

run user input:

inputText = '''My best friend and I have been studying in the same 
               school since kindergarten.'''

run from user text file:

inputText = filePATH

# Like:
# inputText = "E:/EDU/project/input.txt"

Example

input:

My best friend and I have been studying in the same school since kindergarten. We have been classmates each year at 
school. We share a very close bond and have a special friendship that we cherish and treasure. My friend is my 
partner, sitting beside me in class. She is kindly and helpful, and if I have any difficulties in understanding any 
topic in my studies, or in completing my homework or school project, she helps me. She is brilliant in mathematics 
and the sciences, while I am good at English. So we both help each other in whatever way possible. She helps me 
without ever belittling me. I greatly appreciate the quality in her. She does not make me feel obliged.

output:

Q-01: Have you been classmates each year?
Q-02: Have you been at school?
Q-03: Who have been classmates each year at school?
Q-04: Who cherish and treasure?
Q-05: Who helps me?
Q-06: Who is good at English?
Q-07: Who helps me without ever belittling me?
Q-08: Who ever belittling me?
Q-09: Who greatly appreciate the quality in her?
Q-10: Whom she does not make feel obliged?

SETTINGS OF MAIN FUNCTION:

main.py

    # Main Function
    def main():
        # Create AQG object
        aqg = aqgFunction.AutomaticQuestionGenerator()

        # Enter input Text File PATH
        inputTextPath = "PATH: (Like:- E:/in.txt)"
        readFile = open(inputTextPath, 'r+')
        inputText = readFile.read()

        questionList = aqg.aqgParse(inputText)
        aqg.display(questionList)

        return 0


    # Call Main Function
    if __name__ == "__main__":
        main()
 

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

automatic-question-generator's People

Contributors

dipta-dhar avatar pidugusundeep avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

automatic-question-generator's Issues

Can i Increase the Complexity of the question..

Hi @dipta1010 ,
I run your code its very helpful to me but i had a doubt that can i increase the Complexity and toughness in the question generation and as well as in answer could you any one help me in this.

Thanks and Regards,
Manikantha Sekhar.

Happy Codding.....

No. of questions

How can I control the number of questions to be given as the output?

Cant find model error

Hi,
When I run main.py, it shows the following error.

OSError: [E050] Can't find model 'en_core_web_md'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.

Please let me know the solution for this problem.

Queries regarding project.

Hey! This project is quite interesting, but I have some queries regarding the code. Is there anyway I can get in touch with you?
Thanks!

Running the code

Hi there, I cloned the automatic question generator to my desktop, but can't get it to run. Could you explain the steps needed to get from cloning it to having the project fully running. That is, could you explain the entire process - how to install the various packages, what to edit within the code so that it works on any system (changing file paths or whatever else). I would really appreciate it.

Can I get in touch?

Hey Dipta! Loved your project and I'd like to improve upon it, but I have a lot of questions regarding the code. Is there any way I can get in touch?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.