Skip to content

Proof of concept application in which a user can enter facts using natural language and later ask questions that the system can use first-order logic inference to reason about.

Notifications You must be signed in to change notification settings

chrisohrstrom/Reasoning-From-Memory

Repository files navigation

Reasoning From Memory

This is a proof of concept of an application that lets a user enter facts using natural language, and the application can later use these facts together with first-order logic inference to answer user questions.

For example:

User enters: Seoul is in Korea.
User enters: Korea lies in Asia.
User asks: Is Seoul located in Asia?
Systems responds: Yes.

In this example the system stores the two entered facts and uses them to infer that Seoul is located in Asia. Notice how both memory and reasoning was necessary to answer the two question.

Requirements

This work depends on the following requirements:

  • NodeJS (>= 12.0.0)
  • Python (>= 3.6)
  • SWI-Prolog (>= 8.0.0)
  • websocketd

Installation

Start by cloning the repository:

git clone https://github.com/ChrisFugl/Reasoning-From-Memory

Install Python packages through pip:

pip install -r requirements.txt

Install English core for spaCy.

python -m spacy download en_core_web_md

Install node modules.

npm install

Usage

There are two ways to use this application: In a browser or in a shell. The application may take ~15 seconds to load, since it has to load word embeddings for the English language.

Browser

Start the server.

websocketd --port 10579 python start_web.py

Run this command in another terminal session to open the web application:

npm start

The browser should automatically open a new window/tab, but go to localhost:8080 in case it does not.

Shell

Run this command:

python start_shell.py

About

Proof of concept application in which a user can enter facts using natural language and later ask questions that the system can use first-order logic inference to reason about.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •