|
|
--- |
|
|
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> |
|
|
|