Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.

Graph NLU

Preview Image

Motivation 📊

Graph NLU uses graph databases as a means to represent natural language relationships flexibly and dynamically.

The primary motivation for this project is to develop a way to understand natural language dialog in an interactive setting by remembering previous dialog states. Virtual assistants like Siri, Google Assistant, and Alexa have the common problem that they behave like amnesiacs, i.e., they do not remember much about previous interactions.

One proposal to get around the memory problem is by representing the previous dialog states using a persistent graph. Because graphs offer a powerful and interpretable way of encoding high-level representations of entities and their associated relationships, an attractive proposition is to leverage them in processing natural language. Graph databases (e.g., Neo4j) offer a rich suite of tools to quickly construct such graphs and persist them over the long term.

This project is in its research phase, hence all code in this repository is exploratory. The supplied Jupyter (iPython) notebooks do the following:

  1. Examine several dialog domains
  2. Explain some of the design considerations for using graphs to process natural language
  3. Define models for solving a dialog domain
  4. Evaluate these models for accuracy and usefulness

Explanations behind each code snippet are given where possible. Read the research paper (PDF) discussing a more detailed approach to the personal assistant memory problem.

Getting Started 🚥

Get an introduction to this project by viewing the supplied Jupyter notebooks in GitHub under the notebooks directory:

Running the Code 🐍

The Python code uses the Neo4j graph database to store and query natural language relationships. In addition, several processing steps will require popular Python data processing tools like pandas, numpy, sklearn, and nltk.


  1. Make sure these are on your system:
  1. Install the python packages in requirements.txt if you don't have them already.
pip install -r ./requirements.txt

Running Jupyter Notebooks

  1. Clone the repository.
git clone
cd ./graph-nlu/notebooks
  1. Run the iPython notebooks with Jupyter.
jupyter notebook
  1. Get an introduction to the project with dynamic_memory_1.

Contributing 📣

Interested in the project? We'd love to hear your ideas! Open a GitHub issue with your comments.

About 📋

Created by Dan Kondratyuk, a member of Speech, Language & Interactive Machines (SLIM) at Boise State University.


Graph NLU is a natural language understanding tool that leverages the power of graph databases





No releases published


No packages published