Grand Diomande Research · Full HTML Reader

ߒߞߏ Bridge — Telegram Bot

- **Auto-transliterate** — Send any text, get all 3 scripts instantly - **Script-specific commands** — `/nko`, `/latin`, `/arabic` for targeted conversion - **IPA pronunciation** — `/ipa` with per-character guide for N'Ko input - **Cultural proverbs** — `/proverb` returns a random N'Ko proverb with translation - **Morphological analysis** — `/analyze` decomposes words into roots + affixes - **Inline mode** — Type `@nko_bridge_bot text` in any chat to get transliterations

Language as Infrastructure research note experiment writeup candidate score 20 .md

Full Public Reader

ߒߞߏ Bridge — Telegram Bot

A Telegram bot for real-time N'Ko ↔ Latin ↔ Arabic transliteration, powered by the `nko` Python package.

Features

  • Auto-transliterate — Send any text, get all 3 scripts instantly
  • Script-specific commands — `/nko`, `/latin`, `/arabic` for targeted conversion
  • IPA pronunciation — `/ipa` with per-character guide for N'Ko input
  • Cultural proverbs — `/proverb` returns a random N'Ko proverb with translation
  • Morphological analysis — `/analyze` decomposes words into roots + affixes
  • Inline mode — Type `@nko_bridge_bot text` in any chat to get transliterations

Setup

1. Create a Bot

1. Message [@BotFather](https://t.me/BotFather) on Telegram
2. Send `/newbot`
3. Choose a name (e.g., "ߒߞߏ Bridge")
4. Choose a username (e.g., `nko_bridge_bot`)
5. Copy the bot token

2. Configure

bash
cd Desktop/NKo/bots/telegram

# Option A: Environment variable
export BOT_TOKEN=123456:ABC-DEF...

# Option B: .env file
cp .env.example .env
# Edit .env and paste your token

3. Install Dependencies

bash
pip install -r requirements.txt
# The nko package must be importable (install from project root):
cd Desktop/NKo
pip install -e .

4. Run

bash
python bot.py

The bot starts polling for messages. Send it text and get transliterations!

Commands

CommandDescriptionExample
`/start`Welcome message`/start`
`/help`List all commands`/help`
`/transliterate <text>`All 3 scripts + IPA`/transliterate salam`
`/nko <text>`Convert to N'Ko`/nko hello`
`/latin <text>`Convert to Latin`/latin ߒߞߏ`
`/arabic <text>`Convert to Arabic`/arabic salam`
`/ipa <text>`IPA pronunciation`/ipa ߒߞߏ`
`/proverb`Random proverb`/proverb`
`/analyze <text>`Morphological analysis`/analyze mogolu`

Inline Mode

In any Telegram chat, type:

@nko_bridge_bot salam

Choose from results: All Scripts, N'Ko, Latin, Arabic, or IPA.

Plain Text

Just send any text directly to the bot — it auto-detects the script and transliterates to all three.

Deployment

Systemd (Linux)

ini
[Unit]
Description=NKo Bridge Telegram Bot
After=network.target

[Service]
ExecStart=/usr/bin/python3 /path/to/NKo/bots/telegram/bot.py
Environment=BOT_TOKEN=your-token-here
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target

Docker

dockerfile
FROM python:3.11-slim
WORKDIR /app
COPY . .
RUN pip install python-telegram-bot && pip install -e /app
ENV BOT_TOKEN=your-token-here
CMD ["python", "bots/telegram/bot.py"]

Webhook (Production)

For high-traffic deployment, switch from polling to webhooks:

python
# In bot.py, replace app.run_polling() with:
app.run_webhook(
    listen="[ip]",
    port=8443,
    url_path=TOKEN,
    webhook_url=f"https://your-domain.com/{TOKEN}",
)

Files

bots/telegram/
├── bot.py              # Main bot code
├── requirements.txt    # Python dependencies
├── .env.example        # Token configuration template
└── README.md           # This file

Promotion Decision

Attach run IDs, datasets, metrics, and reproduction commands.

Source Anchor

NKo/bots/telegram/README.md

Detected Structure

Evaluation · Figures · Code Anchors · Architecture