Question Answering Database-Style Algorithm Finder
Question Answering Database-Style Algorithm Finder is a SWI-Prolog algorithm that finds database style list-based algorithms with question answering, for example:
e.g. for cultural translation tool, the input lists of tuples: orig-trans, trans-bt where orig-bt have same meaning and input orig and output translation:
a(OT,TB,BO,O,T):-
member(A1,OT),A1=[O,T],
member(A2,TB),A2=[T,B],
member(A3,BO),A3=[B,O].
which is run as:
?- a([[a,b]],[[b,a]],[[a,a]],a,T).
T = b.
Please read the following instructions on how to install the project on your computer for writing algorithms.
- Use a search engine to find the Homebrew (or other) Terminal install command for your platform and install it, and search for the Terminal command to install swipl using Homebrew and install it or download and install SWI-Prolog for your machine at SWI-Prolog.
- In Terminal settings (Mac), make Bash the default shell:
/bin/bash
- In Terminal, edit the text file
~/.bashrcusing the text editor Nano:
nano ~/.bashrc
- Add the following to the file
~/.bashrc:
export PATH="$PATH:/opt/homebrew/bin/"
- Check if
usr/local/binexists
ls -ld /usr/local/bin
- Create the directory if missing
sudo mkdir -p /usr/local/bin
- Link to swipl in Terminal
sudo ln -s /opt/homebrew/bin/swipl /usr/local/bin/swipl
Download this repository.
- Download the LPPM Repository:
mkdir GitHub
cd GitHub/
git clone https://github.com/luciangreen/List-Prolog-Package-Manager.git
cd List-Prolog-Package-Manager
swipl
['lppm'].
lppm_install("luciangreen","qa_db_finder").
../
halt.
- In Shell:
cd qa_db_finderswipl['qa_db_finder.pl'].qa_db_finder(Algorithm).
Lucian Green - Initial programmer - Lucian Academy
I licensed this project under the BSD3 License - see the LICENSE.md file for details