File size: 5,026 Bytes
6ddce18 e4963d6 a1f4b2d e4963d6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
---
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
[](https://huggingface.co/spaces/NurseCitizenDeveloper/Nursing-Language-Translator)
[](https://huggingface.co/NurseCitizenDeveloper/NurseEmbed-300M)
[](https://opensource.org/licenses/Apache-2.0)
**Translate NHS clinical shorthand to formal language using AI.**
Powered by [NurseEmbed-300M](https://huggingface.co/NurseCitizenDeveloper/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
```bash
# 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](LICENSE) file for details.
## π¨ββοΈ Author
**Lincoln Gombedza** ([@NurseCitizenDeveloper](https://huggingface.co/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
- [NurseEmbed-300M](https://huggingface.co/NurseCitizenDeveloper/NurseEmbed-300M) - The embedding model
- [NurseSim-Triage](https://huggingface.co/spaces/NurseCitizenDeveloper/NurseSim-Triage) - AI triage training
- [The Virtual Ward](https://huggingface.co/spaces/NurseCitizenDeveloper/The-Virtual-Ward) - RL environment for ward management
---
<p align="center">
Built with β€οΈ for NHS Nurses
</p>
|