Skip to content

IntelLabs/ConvAssist

ConvAssist

OpenSSF Scorecard Unit Tests pytorch GitHub License python-support

ConvAssist is a library intended to enable and empower users with disabilities to communicate using the latest language modeling technologies, via Intel's Assistive Context Aware Toolkit, ACAT. ConvAssist can quickly suggest utterances/sentences that the user can use to have a social conversation or communicate with their caregiver in near real time.

ConvAssist is built on Pressagio, that is a library that predicts text based on n-gram models. Pressagio is a pure Python port of the presage library and is part of the Poio project.

ConvAssist contains language models based on specific Assistive and Augmentative Communication (AAC) datasets, and dialog datasets, tailored for day-to-day communication in our assistive usecase. These language models support both next word prediction and sentence completion for enabling near-real time communication with least amount of user effort and intervention.

Predictor Classes

Sentence Completion Predictor

SentenceCompletionPredictor is a class that provides sentence completion predictions using a combination of n-gram models and GPT-2.

Spell Correct Predictor

SpellCorrectPredictor is a class that extends the Predictor class to provide spell correction functionality. It uses a spell checker to generate suggestions for the last token in the context.

Canned Phrases Predictor

CannedPhrasesPredictor is a class that searches a database of canned phrases to find matching next words and sentences based on a given context.

Canned Word Predictor

CannedWordPredictor is a specialized predictor that extends the SmoothedNgramPredictor. It is designed to handle canned responses using natural language processing (NLP) techniques.

Smoothed NGram Predictor

SmoothedNgramPredictor is a class that extends the Predictor class to provide functionality for predicting the next word(s) in a sequence using smoothed n-grams.

General Word Predictor

GeneralWordPredictor is a class that extends SmoothedNgramPredictor to provide word predictions based on a precomputed set of most frequent starting words from an AAC dataset.

Installation and use

ConvAssist works with Python 3.12.x or greater. Create a virtual environment and install the required packages. We provide a pyproject.toml file to assist, and use Poetry for package management.

Create a Virtual Environment with Poetry

  1. Clone the Repository:

    git clone https://github.com/IntelLabs/ConvAssist.git
    cd ConvAssist
  2. Install Poetry: If you don't have Poetry installed, you can install it by following the instructions on the Poetry website.

  3. Install Dependencies and Create Virtual Environment:

    poetry install

    This command will create a virtual environment, install the dependencies specified in the pyproject.toml file, and set up the environment for you.

  4. Activate the Virtual Environment:

    poetry shell

    This command activates the virtual environment created by Poetry.

Installation and use

ConvAssist works with Python 3.12.x or greater. Create a virtual environment and install the required packages. We provide a pyproject.toml file to assist, and use Poetry for package management.

Create a Virtual Environment with Poetry

  1. Clone the Repository:

    git clone https://github.com/IntelLabs/ConvAssist.git
    cd ConvAssist
  2. Install Poetry: If you don't have Poetry installed, you can install it by following the instructions on the Poetry website.

  3. Install Dependencies and Create Virtual Environment:

    poetry install

    This command will create a virtual environment, install the dependencies specified in the pyproject.toml file, and set up the environment for you.

  4. Activate the Virtual Environment:

    poetry shell

    This command activates the virtual environment created by Poetry.

Run

We provide several demonstration apps to showcase how to use ConvAssist

DEMO - Continuous Predict

cd interfaces/Demos/continuous_predict
python pyprompter.py

The continuous_prediction.ini file defines which predictors are enable. See documentation for continuous_predict for details on how to use the configuration file.

License

ConvAssist source code is distributed under the GPL-3.0 or later license.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages