Giter VIP home page Giter VIP logo

methodsinairesearch's Introduction

MAIR-G8

Intent detection

This project consists of the following baseline systems for intent detection:

  • A baseline system that, regardless of the content of the utterance, always assigns the majority class of the data. (baseline_majority.py)
  • A baseline rule-based system based on keyword matching. (baseline_keyword_matcher.py)

As well as three different machine learning classifiers for intent detection:

  • kNN (ml_knn.py)
  • Logistic regression (ml_logreg.py)
  • Linear SVC (ml_lsvc.py)

The table below shows the accuracy value of each of these models:

Baseline (majority) Baseline rule-based system kNN model Logistic regression Linear SVC
Test accuracy 0,400 0,903 0,962 0,983 0,958
Train accuracy 0,398 0,968 0,987 0,962

Dialog Management

The Dialog Management System can be found in dialogstate.py. The user can have a conversation in the CLI with the system by running the main.py file. An example conversation can be executed by running the dialogstate.py file. The file dialogstate_tests.py contains test cases for all 16 provided examples. Please see the installation instructions to download the required PyPi packages (a requirements.txt file is included in this repo). The configuration of the Dialog Manager can be altered with the .env file in the root of this repository. Please note that not all options are implemented yet.

To add random antecedents to the restaurant_info.csv file, run the add_columns.py script. To add the consequents to the antecedents file, run the add_consequents.py script.

State Transition Diagram

State Transition Diagram

Configurability

The system currently supports five configurability options:

  • Printing the system utterances in all-caps output_in_caps=False (True or False)
  • Maximum Levenshtein distance for filling in the slots max_lev_distance=3 (integer 1 or higher)
  • Insert artificial errors in preference extraction insert_errors=False (True or False)
  • Use formal or informal phrases in system utterances formal=False (True or False)
  • Introduce a delay before showing system responses delay=0 (in milliseconds)
  • Enable or disable printing of system information such as the current intent and state print_info=False (True or False)
  • Whether the system utterances have a coloured output or not coloured_output=True (True or False)

These options can be altered in the .env file at the root of this repository.


The following parameters are used for the data analysis of the experiments and do not affect the system's behaviour:

  • The name of the researcher conducting the experiment researcher_name="Albert" (any from: {"Albert", "Lisa", "Ruben", "Thijs"})
  • The age of the participant participant_age=18 (integer, 18 and higher)

Installation

Place the required data files in the ./data/ folder. The file restaurant_info.csv can be downloaded from BlackBoard. This file can be converted to restaurant_data.csv with the add_columns.py script. The restaurant_data.csv file is the input for the add_consequents.py file to add consequences, this results in the restaurant_data_consequents.csv file which is the input for the Dialog State program.

Install the following packages on Python 3.8+:

pip install -r requirements.txt
python -m spacy download en_core_web_sm

Development

Install the following for the correct linter and formatter:

pip install autopep8 flake8 flake8-import-order flake8-blind-except flake8-builtins flake8-docstrings flake8-rst-docstrings flake8-logging-format
python -m flake8

Flake8 automatically uses the arguments provided in the tox.ini file to check the coding style.

Limitations

  • Dontcares only work if said after states 2, 3, or 4. Preferably, the system automatically figures out to what slot dontcares belong to
  • A minimal example for text-to-speech can be found in tts.py, this is sadly not yet implemented
  • Asking the user if they would like a place with or without assigned seating is not yet implemented
  • Not all options in the configuration file are implemented yet

methodsinairesearch's People

Contributors

albertusalvin avatar denbergvanthijs avatar rubenweijers avatar tanakalisa1 avatar

Watchers

 avatar  avatar  avatar

methodsinairesearch's Issues

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.