Giter Site home page Giter Site logo

automatic-question-generator's Introduction

Automatic Question Generator [AQG]

Automatic Question Generator from Text

Prerequisites

- Python 3.5+
- NLTK
- SpaCy
- NumPy

Quickstart

Run a sentence

python main.py --> inputText = "My best friend and I have been studying in the same school since kindergarten."

Run a textfile

python main.py --> inputText = filePATH
                   Like: inputText = "E:/EDU/Study/FinalProject/NLPio/in.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?

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

Watchers

James Cloos avatar

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.