# Amharic Keyboard for iPhone
A native iOS Custom Keyboard Extension for Amharic (Ethiopic/ግዕዝ) speakers, built with Swift. Works system-wide in any iPhone app — just like Gboard or SwiftKey.
## Features
| Feature | Description |
|---------|-------------|
| **Amharic Keyboard** | QWERTY Latin layout with transliteration: type `selam` → `ሰላም` |
| **Handwriting Input** | Draw Ethiopic characters by hand; tap candidates to insert |
| **Word Predictions** | Suggestion bar with prefix completion and bigram next-word |
| **Translation** | Amharic ↔ English translation via LibreTranslate API |
## Project Structure
```
AmharicKeyboard/
├── Shared/ # Local Swift Package (AmharicCore)
│ ├── Sources/AmharicCore/
│ │ ├── Transliteration/ # TransliterationEngine, EthiopicCharacterMap
│ │ ├── Prediction/ # WordPredictionEngine, WordFrequencyStore
│ │ ├── Handwriting/ # StrokeRecognizer ($N algorithm), StrokeNormalizer
│ │ └── Translation/ # LibreTranslateClient, TranslationCache
│ └── Resources/
│ ├── amharic_wordlist.txt # Word frequency list
│ ├── amharic_bigrams.json # Bigram next-word table
│ └── ethiopic_strokes.json # Handwriting recognition templates
│
├── ContainerApp/ # Required iOS host app (onboarding + settings guide)
├── KeyboardExtension/ # UIInputViewController keyboard extension
│ ├── KeyboardViewController.swift
│ └── Views/
│ ├── TypingMode/ # QWERTY keyboard with transliteration
│ ├── HandwritingMode/ # Canvas + stroke recognition + candidates
│ ├── TranslationMode/ # Amharic ↔ English translation panel
│ ├── TabBar/ # Keyboard / Draw / Translate tabs
│ └── Shared/ # SuggestionBarView, KeyboardTheme
└── setup_xcode_project.sh # Helper script to generate Xcode project
```
## Getting Started
### Requirements
- Mac with Xcode 15+
- iPhone running iOS 16+ (or Simulator …