Logo Lanfrica

zaynab724/darija_translator

Domain:

natural language processing

Record type:

software
Creator:
zay
Host:
LLM-powered RESTful Web Service for Moroccan Darija translation. Built with Spring Boot and Google Gemini 3 Flash, featuring a distributed architecture with multiple client integrations (Chrome Extension, React Native, Python, and PHP). # πŸ‡²πŸ‡¦ Darija Translator --- LLM-Powered RESTful Web Service **Mini Project 2 \| Advanced Distributed Programming Paradigms**\ **Professor:** Pr. El Habib Nfaoui ------------------------------------------------------------------------ ## Overview A robust Spring Boot RESTful Web Service designed to translate text from multiple source languages (English, French, Spanish, and Arabic MSA) into Moroccan Arabic Dialect (Darija). The system leverages the **Google Gemini 3 Flash model** for high-accuracy, context-aware translations. ------------------------------------------------------------------------ ## Why Spring Boot? To align with modern distributed paradigms, Spring Boot was utilized to replace traditional Jakarta EE boilerplate: - **Embedded Tomcat:** No manual WildFly or GlassFish setup\ - **Java-Based Security:** Replaced web.xml with a fluent SecurityFilterChain\ - **Simplified Configuration:** Credentials and API keys managed in `application.properties`\ - **Jakarta Mapping:** REST concepts follow course slide patterns ------------------------------------------------------------------------ ## Project Structure darija-translator/ β”‚ β”œβ”€β”€ java-rest-service/ β”‚ β”œβ”€β”€ src/main/java/ma/project/ β”‚ β”‚ β”œβ”€β”€ DarijaTranslatorApplication.java β”‚ β”‚ β”œβ”€β”€ TranslatorController.java β”‚ β”‚ β”œβ”€β”€ GeminiService.java β”‚ β”‚ └── SecurityConfig.java β”‚ └── resources/application.properties β”‚ β”œβ”€β”€ chrome-extension/ β”‚ β”œβ”€β”€ sidepanel.html/js β”‚ └── manifest.json β”‚ β”œβ”€β”€ php-client/ β”‚ └── translator_client.php β”‚ β”œβ”€β”€ python-client/ β”‚ └── translator_client.py β”‚ └── react-native-client/ └── DarijaTranslatorApp/ β”œβ”€β”€ App.js └── api.js ------------------------------------------------------------------------ ## Quick Start ### 1. Configure the Backend - Obtain a Gemini API Key from Google AI Studio\ - Open: java-rest-service/src/main/resources/application.properties - Add your key: gemini.api.key=YOUR_ACTUAL_KEY ### 2. Launch the Service ``` bash cd jav …