Giter Club home page Giter Club logo

unibot's Introduction

Unitbot

A pattern-based intelligent agent that responds to university course and student-related questions, using an RDF graph database and natrual language processing (NLP).

Architecture

Unibot is developed in Python using a number of libraries including rdflib, pandas, spaCy, and tika to process and represent information as an interconnected knowledge base (graph). It utilizes various other tools like Apache Jena Fuseki to offer a SPARQL server and Rasa chatbot framework to offer a natural language interface that can be used to query the knowledge graph through natural language.

Knowledge Base

Unibot contains a set of scripts that given the data can automatically construct a knowledge graph to represent information about:

  • Universities:
    1. Name of the university
    2. Link to the university's entry in DBpedia and/or Wikidata
  • Courses:
    1. Course name
    2. Course subject
    3. Course number
    4. Course credits
    5. Course description
    6. A link to a web page with the course information if available
    7. Course outline, if available
  • Lectures in a course:
    1. Lecture number
    2. Lecture name
    3. Lecture content, such as:
      • Slides
      • Worksheets
      • Readings (book chapters, web pages, etc)
      • Other materials (videos, images, etc)
    4. A link to a web page with the lecture information, if available
  • Topics covered in a course
  • Students
    1. Name (first, last)
    2. ID number
    3. Email
    4. Completed courses with their grades
    5. Competencies, defined as a set of topics, based on the courses a student successfully passed

Unibot's knowledge graph re-uses existing vocabularies including FOAF and VIVO where appropriate and uses FOCU, its own vocabulary.

The diagram below illustrates the design of the graph. You can get a closer and more detailed look at the graph through its schema.

Local Setup

After cloning the repository, install the dependencies outlined in the requirements.txt file. For convenience, you can use Python's venv package to install dependencies in a virtual environment. You can find the instructions on creating and activating a virtual environment in the official documentation. After setting up and activating your environment, you can install the dependencies by running the following command in your terminal:

$ pip install -r requirements.txt

Now the instructions below in order:

  1. Convert pdf files to text files by running the following command in your terminal:
python -m /Data/Topics/txt_generator.py
  1. Construct the knowledge base by running the following command in your terminal:
python -m main.py
  1. Populate the fuseki database by creating a project named Project1 and upload database.nt.

  2. Lastly, run the fuseki server in the background, move to the rasa directory by running the following command in your terminal:

cd rasa

Launch unibot by running the following command in your terminal:

rasa run actions && rasa shell

You can now talk to unibot, try one of the questions below:

  • Which topics is Trenae Bryan competent in?
  • Which students have retaken the same course at least 2 times?
  • How many students are enrolled in each course that is offered by Concordia University?

License

Unibot is licensed under the terms of MIT License

unibot's People

Contributors

aznrobot avatar rmanaem avatar wboughattas avatar weilien717 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

echaflo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.