Coder Social home page Coder Social logo

holylovenia / question-answer-generation Goto Github PK

View Code? Open in Web Editor NEW
65.0 8.0 24.0 61.28 MB

Question-answer generation from text

Jupyter Notebook 82.40% Python 17.12% Perl 0.48%
question-answer-generation natural-language-processing text-summarization named-entity-recognition question-formation

question-answer-generation's Introduction

Automatic Question-Answer Pairs Generation from Text

Members

  1. Holy Lovenia

  2. Agus Gunawan

  3. Felix Limanta

English Paper

We have a technical report that explains our question-answer generation system here.

Architecture in overview

We propose an approach which is generally based on the framework of an ongoing work by A. Sarvaiya. Formally, given a passage , question-answer generation (QAG) system retrieves the most important sentence from . Then, QAG system produces a set of question-answer pairs , where each generated can be found in , and its pair is the interrogative version of or a clause from a set of clauses in , without in it. As shown in the figure below, here are four main modules in our QAG system.

architecture-overview

  1. Preprocessing, which cleans the input passage from unnecessary characters and shapes it into the desirable form (list of sentences).

  2. Sentence Selection, which picks top- most important sentences given . The text summarization method used can be chosen between TextRank, multi-word phrase extraction (MWPE), and latent semantic analysis (LSA). The chosen method ranks the sentences in P and selects the top- highest ranked sentences as the output.

  3. Gap Selection, which selects phrases in that can be used as answers based on constituent tree from syntactic parser and named entity recognition (NER).

  4. Question Formation, which creates the interrogative version of or in without to make a question for each answer in . The final output of this module is question-answer pairs related to .

Result

  1. Demonstration with Jupyter Notebook

  2. Source code for the web version is in this GitHub repository. Check it out!

Installation

  1. Export '$STANFORD_PARSER' environment variable using lib path using command EXPORT STANFORD_PARSER=<ABSOLUTE_PATH> e.g. EXPORT STANFORD_PARSER=/home/anonymous/question-answer-generation/QuestionGeneration/lib
  2. If you want the website version please see the link above
  3. If the program stuck after loading the model. It's because the port already used. This happened usually after you already run the program twice or several times. Please kill the process that runs on the port using lsof -i find java, kill the proces PID.

result

question-answer-generation's People

Contributors

agusgun avatar felixlimanta avatar holylovenia 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

question-answer-generation's Issues

how should i run this project?

I have tried run app.py,and the following sentences are shown.
C:\Users\i_am_sixsix\Desktop\all\project\question-answer-generation-master\venv\Scripts\python.exe C:/Users/i_am_sixsix/Desktop/all/project/question-answer-generation-master/QuestionGeneration/app.py
Load Model Success


default values:
senna path:
C:\Users\i_am_sixsix\Desktop\all\project\question-answer-generation-master\QuestionGeneration\lib\senna\
Dependencie parser:
C:\Users\i_am_sixsix\Desktop\all\project\question-answer-generation-master\QuestionGeneration\lib
Stanford parser clr java -cp stanford-parser.jar edu.stanford.nlp.trees.EnglishGrammaticalStructure -treeFile in.parse -collapsed


i dont know what it means.
help!
plz!

Why do i get this error? AttributeError: 'NoneType' object has no attribute 'label'

File "/home/frenk/Scaricati/question-answer-generation-master/QuestionGeneration/get_questions.py", line 23, in
questions = qg.process(top_sentences=1)

File "/home/frenk/Scaricati/question-answer-generation-master/QuestionGeneration/app.py", line 47, in process
self.__generate_questions_from_sentence(self.sentences[r])

File "/home/frenk/Scaricati/question-answer-generation-master/QuestionGeneration/app.py", line 26, in __generate_questions_from_sentence
candidates = gapper.process()

File "/home/frenk/Scaricati/question-answer-generation-master/QuestionGeneration/question_generation/gap_selection.py", line 144, in process
self.fetch_parent()

File "/home/frenk/Scaricati/question-answer-generation-master/QuestionGeneration/question_generation/gap_selection.py", line 95, in fetch_parent
if parent.label() == 'S':

AttributeError: 'NoneType' object has no attribute 'label'

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.