NurseCitizenDeveloper's picture
Add HF Space frontmatter configuration to README
6ddce18

A newer version of the Gradio SDK is available: 6.5.1

Upgrade
metadata
title: Nursing Language Translator
emoji: πŸ₯
colorFrom: blue
colorTo: indigo
sdk: gradio
sdk_version: 4.44.0
app_file: app.py
pinned: false
license: apache-2.0
short_description: Translate NHS clinical shorthand to formal language

πŸ₯ Nursing Language Translator

Hugging Face Spaces Model License

Translate NHS clinical shorthand to formal language using AI.

Powered by NurseEmbed-300M, a clinical embedding model fine-tuned on NHS nursing terminology.

πŸš€ Try It Now

Live Demo: https://huggingface.co/spaces/NurseCitizenDeveloper/Nursing-Language-Translator

✨ Features

Feature Description
πŸ”€ 170+ NHS Abbreviations SOB, NEWS2, NOF, UTI, COPD, AF, LMWH, etc.
⚠️ NEWS2 Interpretation Automatic risk scoring with clinical actions
🧠 Semantic Matching AI-powered translation, not just string matching
πŸ“Š Confidence Scores See how confident the model is in each translation
πŸ“š Reference Guide Browse all abbreviations by category

πŸ“ Example

Input:

72M c/o SOB, NEWS2 score is 7, PMH: COPD, AF. Started on Salbutamol NEB and LMWH.

Output:

Term Translation Category
72M 72-year-old Male Demographics
c/o complaining of Assessment
SOB Shortness of Breath Respiratory
NEWS2 7 πŸ”΄ High risk - Emergency response required Assessment
PMH Past Medical History History
COPD Chronic Obstructive Pulmonary Disease Respiratory
AF Atrial Fibrillation Cardiovascular
NEB Nebuliser Route
LMWH Low Molecular Weight Heparin Medication

πŸ› οΈ Local Installation

# Clone the repository
git clone https://github.com/Clinical-Quality-Artifical-Intelligence/nursing-language-translator.git
cd nursing-language-translator

# Install dependencies
pip install -r requirements.txt

# Run the app
python app.py

Open http://localhost:7860 in your browser.

πŸ“ Project Structure

nursing-language-translator/
β”œβ”€β”€ app.py                  # Main Gradio application
β”œβ”€β”€ knowledge_base.json     # 170+ NHS abbreviations database
β”œβ”€β”€ requirements.txt        # Python dependencies
└── README.md               # This file

🧠 How It Works

  1. Input Parsing: Extracts individual terms and phrases from clinical text
  2. Semantic Embedding: Uses NurseEmbed-300M to create vector representations
  3. Knowledge Base Matching: Finds the closest matching abbreviation in the database
  4. NEWS2 Detection: Automatically identifies and interprets Early Warning Scores
  5. Translation Generation: Produces formal clinical language with confidence scores

πŸ“Š Model Performance

NurseEmbed-300M was trained using a two-stage hybrid approach:

Stage Dataset Samples Performance
Stage 1 (Medical) miriad-4.4M-split 10,000 81.3% Acc@1
Stage 2 (Nursing) Custom NHS dataset 200 95.4% Acc@10

🏷️ Abbreviation Categories

  • Assessment: NEWS2, MUST, Waterlow, AVPU, GCS
  • Respiratory: SOB, COPD, URTI, LRTI, O2 sats
  • Cardiovascular: AF, MI, PE, DVT, CCF
  • Medications: LMWH, GTN, PRN, STAT, OD/BD/TDS
  • Routes: IV, IM, SC, PO, PR, NEB
  • Investigations: CXR, ECG, FBC, U&E, CT, MRI
  • Locations: A&E, AMU, ITU, HDU, CCU
  • And 10+ more categories...

🀝 Contributing

Contributions are welcome! To add new abbreviations:

  1. Fork the repository
  2. Edit knowledge_base.json to add new entries
  3. Submit a pull request

πŸ“„ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

πŸ‘¨β€βš•οΈ Author

Lincoln Gombedza (@NurseCitizenDeveloper)

  • πŸ₯ Registered Learning Disability Nurse
  • πŸŽ“ Practice Educator
  • πŸ’» Co-Chair, Digital & Technology Working Group NHS Professional Strategy for Nursing and Midwifery
  • πŸš€ Founder, Nursing Citizen Development Movement

πŸ”— Related Projects


Built with ❀️ for NHS Nurses