--- 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 ---
Built with ❤️ for NHS Nurses