Skip to content

w4nderlust/qa-baseline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

qa-baseline

A simple question answering baseline. It ssings a score to each candidate answer depending on how many times and at which rank the candidate ansers appear in the title and snippet of Bing results.

Installation

The only requirement is py-web-search:

pip install py-web-search

Usage

usage: qa-baseline.py [-h] -q QUESTION -a ANSWERS [ANSWERS ...] [-r RESULTS]
                      [-l LANG]

optional arguments:
  -h, --help            show this help message and exit
  -q QUESTION, --question QUESTION
                        the question you want to ask
  -a ANSWERS [ANSWERS ...], --answers ANSWERS [ANSWERS ...]
                        the candidate answers
  -r RESULTS, --results RESULTS
                        The number of search engine results to consider
  -l LANG, --lang LANG  The language of the question

Example:

python qa-baseline.py -q "who invented python ?" -a guido carlo -l en -r 30

returns:

guido - probablity: 0.6645  raw score: 0.6835
carlo - probablity: 0.3355  raw score: 0.0000

About

A simple questiona answering baseline

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages