{"id":26741061,"url":"https://github.com/purr/telegram-dictionary","last_synced_at":"2026-06-23T08:31:12.201Z","repository":{"id":283568501,"uuid":"952177543","full_name":"purr/telegram-dictionary","owner":"purr","description":"A Telegram bot that works in inline mode to lookup definitions of words in public dictionaries.","archived":false,"fork":false,"pushed_at":"2025-03-20T22:34:22.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T05:29:25.545Z","etag":null,"topics":["aiogram","dictionary","telegram"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/purr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-20T21:22:48.000Z","updated_at":"2025-03-20T22:34:25.000Z","dependencies_parsed_at":"2025-03-20T23:39:31.727Z","dependency_job_id":null,"html_url":"https://github.com/purr/telegram-dictionary","commit_stats":null,"previous_names":["purr/telegram-dictionary"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/purr/telegram-dictionary","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purr%2Ftelegram-dictionary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purr%2Ftelegram-dictionary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purr%2Ftelegram-dictionary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purr%2Ftelegram-dictionary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/purr","download_url":"https://codeload.github.com/purr/telegram-dictionary/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purr%2Ftelegram-dictionary/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34682622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aiogram","dictionary","telegram"],"created_at":"2025-03-28T05:29:28.134Z","updated_at":"2026-06-23T08:31:12.196Z","avatar_url":"https://github.com/purr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Telegram Dictionary Bot 📚\n\nThis bot provides dictionary definitions for words directly in Telegram chats using inline queries.\n\n## Features\n\n- Fast inline query lookups for word definitions\n- Multiple dictionary sources (Primary API, WordNet, Urban Dictionary)\n- Detailed word information including:\n  - Definitions\n  - Examples\n  - Synonyms and antonyms\n  - Pronunciations\n  - Audio links where available\n- Fallback to WordNet when words aren't found in the primary API\n- Urban Dictionary results for slang and colloquial meanings\n\n## Requirements\n\n- Python 3.7+\n- NLTK with WordNet corpus\n- Aiogram 3.x\n- Requests\n\n## NLTK Data Setup\n\nThis bot uses NLTK's WordNet corpus as a fallback dictionary. You need to download the WordNet data before running the bot:\n\n```python\nimport nltk\nnltk.download('wordnet')\n```\n\nYou can run this in a Python interpreter, or add it to a setup script. The data is downloaded once and stored locally.\n\n## Configuration\n\nCreate a `.env` file in the root directory with the following variables:\n\n```\nBOT_TOKEN=your_telegram_bot_token\n```\n\n## Installation\n\n1. Clone this repository\n2. Install requirements: `pip install -r requirements.txt`\n3. Download NLTK data: `python -c \"import nltk; nltk.download('wordnet')\"`\n4. Create a `.env` file with your Telegram bot token\n5. Run the bot: `python run.py`\n\n## Usage\n\nIn any Telegram chat, type `@YourBotUsername word` to look up definitions for \"word\".\n\nThe bot will display:\n\n1. Dictionary definition (if available)\n2. Detailed information (if significantly different from basic definition)\n3. Urban Dictionary results (if available)\n\n## How It Works\n\n1. The bot monitors inline queries sent to it 📡\n2. When a user types `@your_bot_name` followed by a word, it triggers an inline query\n3. The bot waits for the user to finish typing (using a debounce technique) ⌨️\n4. It then looks up the word in the Free Dictionary API 🔎\n5. If a definition is found, it formats and returns it as an inline result ✅\n6. If no definition is found in the primary dictionary, it falls back to WordNet 📚\n7. If found in WordNet, it displays multiple definitions with synonyms and examples\n8. If no definition is found in any dictionary, it notifies the user ❌\n\n## Project Structure\n\n- `bot.py`: Main bot implementation using aiogram\n- `dictionary_service.py`: Service for dictionary lookups and formatting\n- `config.py`: Configuration settings\n- `run.py`: Script to run the bot with dependency checking\n- `requirements.txt`: List of required Python packages\n- `.env.example`: Example environment variables file\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details. 📜\n\n## Acknowledgements\n\n- [Free Dictionary API](https://dictionaryapi.dev/) for providing free dictionary data\n- [NLTK WordNet](https://www.nltk.org/howto/wordnet.html) for comprehensive lexical database\n- [aiogram](https://docs.aiogram.dev/) for the Telegram Bot framework\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request. 🤝\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurr%2Ftelegram-dictionary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpurr%2Ftelegram-dictionary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurr%2Ftelegram-dictionary/lists"}