Logo Lanfrica

marouan-boumchahate/Darija-Translator

Domain:

natural language processing

Record type:

software
Creator:
mar
Host:
An AI agent assists users to translate between languages with a high support for the moroccan darija that is NOT exists in other tranlation apps # Darija Translator ๐Ÿ‡ฒ๐Ÿ‡ฆ An AI-powered translator specifically designed for Moroccan Darija (Moroccan Arabic). This tool provides accurate translations between Darija and other languages including Arabic, English, and French, focusing on contextual meaning rather than literal word-by-word translation. ## ๐ŸŒŸ Features - **Contextual Translation**: Translates by meaning, not word-for-word (e.g., "ุฒูŠุฏ ู†ู‚ุต" โ†’ "decrease more" not "add less") - **Darija-Focused**: Specialized in Moroccan Arabic with cultural context understanding - **Multi-language Support**: Translates between Darija and: - ๐Ÿ‡ธ๐Ÿ‡ฆ Modern Standard Arabic (ุงู„ุนุฑุจูŠุฉ ุงู„ูุตุญู‰) - ๐Ÿ‡บ๐Ÿ‡ธ English - ๐Ÿ‡ซ๐Ÿ‡ท French - **Clean Output**: Returns only the translation without explanations - **Interactive Web Interface**: User-friendly Gradio interface - **Bidirectional Translation**: Supports both directions (Darija โ†” Other Languages) ## ๐Ÿš€ Getting Started ### Prerequisites - Python 3.7 or higher - OpenAI API key ### Installation 1. **Clone the repository** ```bash git clone github.com cd darija-translator ``` 2. **Install required packages** ```bash pip install -r requirements.txt ``` 3. **Set up environment variables** Create a `.env` file in the project root: ``` OPENAI_API_KEY=your_openai_api_key_here ``` 4. **Run the application** ```bash jupyter notebook darjia_translator.ipynb ``` Or convert to Python and run directly: ```bash jupyter nbconvert --to python darjia_translator.ipynb python darjia_translator.py ``` ## ๐Ÿ“– Usage 1. **Start the application** - The Gradio interface will launch automatically 2. **Access the translator** at `127.0.0.1` (or the displayed URL) 3. **Enter your text** in the input field 4. **Select source and target languages** 5. **Click "Translate"** to get your translation ### Example Translations | Input (Darija) | Output (English) | |----------------|------------------| | "Bghit nakul" | "I want to eat" | | "Kifach ndir had shi?" | "How โ€ฆ