Skip to content

insafhamdi/AI-hayling

Repository files navigation

🧠 AI-hayling

🎯 EMOHayling – Automatic Scoring for the Emotional Hayling Test

A clinical AI tool designed to automatically score verbal inhibition in classical and emotional contexts — powered by NLP, embeddings, and transformer models.

ICTAI 2025


📌 Project Overview

AI‑Hayling is a research project developed during a 6-month internship at ICube Laboratory (GAIA platform, CNRS / University of Strasbourg) in collaboration with LPC (Laboratory of Psychology Cognitive).

It aims to standardize and automate the scoring of the Hayling Sentence Completion Test, including its emotional variant, using modern NLP techniques and clinically interpretable rules.


🎥 Demo

🚀 Key Features

  • ✅ Scoring pipeline using Word2Vec, FastText, LaBSE, and XLM-R-MNLI
  • 📊 Threshold calibration using Balanced Accuracy
  • 🧠 Rule-based system for proper noun and error categorization
  • 🔎 Semantic similarity score computation
  • 💬 Automatic GUI (PyQt5)
  • 🧪 Evaluated on real and synthetic data from PsychoPy exports
  • 📂 Balanced clinical labels, no data leakage, and no oversampling

🧱 Project Structure

📂 AI-hayling/ ├── 📁 app/ → GUI and scoring logic ├── 📁 models/ → Pretrained models and fine-tuned embeddings ├── 📁 rules/ → Rule-based penalty assignment ├── 📁 scripts/ → Scripts for preprocessing, scoring, evaluation ├── 📁 labse_emotion/ → Fine-tuned LaBSE model (emotion version) ├── 📄 README.md → Project documentation ├── 📄 requirements.txt → Python dependencies ├── 📄 LICENSE → CeCILL v2.1 License


⚡ Quick Start

1. Clone the repository

git clone https://github.com/insafhamdi/AI-hayling.git
cd AI-hayling

2. Create and activate virtual environment

On Linux/macOS:

python3 -m venv .venv
source .venv/bin/activate

On Windows (PowerShell):

python -m venv .venv
.venv\Scripts\Activate.ps1

3. Install dependencies

pip install -r requirements.txt

📊 Usage

You can launch the graphical interface or run specific scoring/evaluation scripts. To launch the GUI:

python app/gui_enhanced.py

To run batch evaluation on Hayling responses:

python scripts/evaluate_responses.py

📚 Citation & References

If you use this repo for research or clinical workflow pilots, cite:

Hamdi I., Lam J., Capobianco A., Tej I. (2025). An Automatic Scoring Method for responses to the Hayling Test. IEEE ICTAI 2025.

📄 License

📝 Licensed under the CeCILL v2.1 License — see LICENSE for more information.

For use in clinical or research settings only.
⚠️ No commercial deployment without explicit approval.

ICTAI logo ICube logo


© 2025 – Insaf Hamdi, ICube (GAIA) & LPC

About

AI-powered scoring tool for the Emotional and Classic Hayling Test

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published