All Projects → allenai → semanticilp

allenai / semanticilp

Licence: Apache-2.0 license
Question Answering as Global Reasoning over Semantic Abstractions (AAAI-18)

Programming Languages

scala
5932 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
java
68154 projects - #9 most used programming language
CSS
56736 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to semanticilp

FinBERT-QA
Financial Domain Question Answering with pre-trained BERT Language Model
Stars: ✭ 70 (+112.12%)
Mutual labels:  question-answering
fastT5
⚡ boost inference speed of T5 models by 5x & reduce the model size by 3x.
Stars: ✭ 421 (+1175.76%)
Mutual labels:  question-answering
lets-quiz
A quiz website for organizing online quizzes and tests. It's build using Python/Django and Bootstrap4 frameworks. 🤖
Stars: ✭ 165 (+400%)
Mutual labels:  question-answering
unsupervised-qa
Template-Based Question Generation from Retrieved Sentences for Improved Unsupervised Question Answering
Stars: ✭ 47 (+42.42%)
Mutual labels:  question-answering
examinee
Laravel Quiz and Exam System clone of udemy
Stars: ✭ 151 (+357.58%)
Mutual labels:  question-answering
expmrc
ExpMRC: Explainability Evaluation for Machine Reading Comprehension
Stars: ✭ 58 (+75.76%)
Mutual labels:  question-answering
DrFAQ
DrFAQ is a plug-and-play question answering NLP chatbot that can be generally applied to any organisation's text corpora.
Stars: ✭ 29 (-12.12%)
Mutual labels:  question-answering
COVID19-IRQA
No description or website provided.
Stars: ✭ 32 (-3.03%)
Mutual labels:  question-answering
hcrn-videoqa
Implementation for the paper "Hierarchical Conditional Relation Networks for Video Question Answering" (Le et al., CVPR 2020, Oral)
Stars: ✭ 111 (+236.36%)
Mutual labels:  question-answering
Front-end-Job-Interview-Questions
Ответы на вопросы на должность Frontend разработчика.
Stars: ✭ 236 (+615.15%)
Mutual labels:  question-answering
CPPNotes
【C++ 面试 + C++ 学习指南】 一份涵盖大部分 C++ 程序员所需要掌握的核心知识。
Stars: ✭ 557 (+1587.88%)
Mutual labels:  question-answering
cmrc2019
A Sentence Cloze Dataset for Chinese Machine Reading Comprehension (CMRC 2019)
Stars: ✭ 118 (+257.58%)
Mutual labels:  question-answering
piaf
Question Answering annotation platform - Plateforme d'annotation
Stars: ✭ 62 (+87.88%)
Mutual labels:  question-answering
rankqa
This is the PyTorch implementation of the ACL 2019 paper RankQA: Neural Question Answering with Answer Re-Ranking.
Stars: ✭ 83 (+151.52%)
Mutual labels:  question-answering
Question-Answering-System
A factoid based question answering system | Python | Flask | NLP
Stars: ✭ 0 (-100%)
Mutual labels:  question-answering
VideoNavQA
An alternative EQA paradigm and informative benchmark + models (BMVC 2019, ViGIL 2019 spotlight)
Stars: ✭ 22 (-33.33%)
Mutual labels:  question-answering
ADNC
Advanced Differentiable Neural Computer (ADNC) with application to bAbI task and CNN RC task.
Stars: ✭ 90 (+172.73%)
Mutual labels:  question-answering
ProQA
Progressively Pretrained Dense Corpus Index for Open-Domain QA and Information Retrieval
Stars: ✭ 44 (+33.33%)
Mutual labels:  question-answering
CONVEX
As far as we know, CONVEX is the first unsupervised method for conversational question answering over knowledge graphs. A demo and our benchmark (and more) can be found at
Stars: ✭ 24 (-27.27%)
Mutual labels:  question-answering
ReQuest
Indirect Supervision for Relation Extraction Using Question-Answer Pairs (WSDM'18)
Stars: ✭ 26 (-21.21%)
Mutual labels:  question-answering

SemanticILP

A structured question answering system on top of free-form text, and borrows ideas from TableILP and TupleILP. The details of the system is explained in the following paper:

@article{semanticilp2018aaai,
  title={Question Answering as Global Reasoning over Semantic Abstractions},
  author={Khashabi, Daniel and Khot, Tushar and Sabharwal, Ashish and Roth, Dan},
  journal={Conference of Association for the Advancement of Artificial Intelligence},
  year={2018}
}

Testing out the system

Our system relies on a couple of annotators that are not publicly available. As a result you (if outside CogComp) cannot run our full system. However, we have created a smaller system which works with public annotators.

Initializing the annotators

The system is dependant on the set of annotators provided in CogCompNLP. In order to run annotators, download version

The system is tested with v3.1.22 of CogCompNLP. Download the package and run the annotator servers, on two different ports PORT_NUMBER1 and PORT_NUMBER2.

# running the main annotators 
./pipeline/scripts/runWebserver.sh  --port PORT_NUMBER1 
# running github external annotators 
./external/scripts/runExternalAnnotatorsWebserver.sh --port PORT_NUMBER2  

Also the system requires Sahand annotator server. This project makes distributed representations available over network. Run it, after downloading it:

> sbt 
> project server 
> run SAHAND_PORT

Then you have to set the ports in SemanticILP. Open Constants.scala and set the ports.

Note: The annotators require good amount of memory:

  • CogComp-NLP pipeline takes up to 25GB
  • CogComp-NLP external annotators takes up to 35GB
  • Sahand takes less than 10GB

Missing Dependencies

Unfortunately some of our dependencies are not available publicly. But there is a hacky way to get around this issue. We have put these dependencies here, which you have to put them in our ivy cache folder. In a typical machine this is where there should be located at: ~/.ivy2/cache/.

Running SemanticILP

And next you have to run the solver itself. You can run the system under different models. Here are the different models you can use:

  • Best overall
  • Best elementary-school science
  • Best process bank

To set the model, take a look at Constants.scala.

In order to initialize the solver, you have the following options:

  • Using it programmatically
  • Using it over network

Next subsections clarify each of the above items:

Note: here are the memory requirements:

  • SemanticILP solver: minimum around 8GB
  • Annotation Server (CogComp): minimum around 17GB
  • Annotation Server (CogComp-external): minimum around 15GB

Run the solver programmatically

To run the solver, clone this project and run create a instance of the solve:

import org.allenai.ari.solvers.textilp.utils.AnnotationUtils
import org.allenai.ari.solvers.textilp.solvers.TextILPSolver
import org.allenai.ari.solvers.textilp.utils.SolverUtils

val annotationUtils = new AnnotationUtils()
val textILPSolver = new TextILPSolver(annotationUtils, verbose = false, SolverUtils.params)
  
val question = "A decomposer is an organism that"
val options = Seq("hunts and eats animals", "migrates for the winter",
                           "breaks down dead plants and animals", "uses water and sunlight to make food")
val paragraph = "organisms that obtain energy by eating dead plant or animal matter. " +
                            "DECOMPOSER An organism that breaks down cells of dead plants and animals into simpler substances." +
                            "The plants use sunlight, carbon dioxide, water, and minerals to make food that sustains themselves and other organisms in the forest."                             
val (selected, statistics) = textILPSolver.solve(question, options, paragraph)
println(selected)
println(statistics)

You can also install it locally (publish-local) and use it as a maven/sbt/... dependency in your program.

Note: If you see an error like this:

Caused by: java.lang.UnsatisfiedLinkError: no jscip-0.1.linux.x86_64.gnu.opt.spx in java.library.path

this means that the solver does not recognize the ILP binary files (common to linux). In that case, add the path to your binary files, to your LD_LIBRARY_PATH variable.

export LD_LIBRARY_PATH=path_to_lib_folder/

Run the solver over a network

This is for the case where you want to access the system either:

  • Limited memory, not enough to run the system on your machine
  • Need to access from a programming language, other than Scala (or any other JVM-based language)
  • Multiple people trying to use it at the same time.

To the run the system over the network, run the following script:

 > sbt 
 > project viz 
 > run 

And access it in this URL:

http://SOLVER_DOMAIN:SOLVER_PORT/solveQuestion?question=QUESTION&options=ANSWERS&snippet=SNIPPET

where SOLVER_DOMAIN is the domain of on which you're running the solver, SOLVER_PORT is the port on which the solver is running, and ANSWERS is the set of candidate answers separated by //. To access the solver, without paragraphs, set SNIPPET to be empty and it will try to retrieve a paragraph using lucene.

To stop it, just do Ctrl+D.

Note that you can access the system via a graphical interface too:

http://SOLVER_DOMAIN:SOLVER_PORT

Questions?

Sure! Create issues or email Daniel. Suggestions? send a pull-request.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].