← 返回
效率工具

english-dict

English dictionary lookup tool. Query English words to get Chinese definitions and generate two example sentences. Use when user needs to look up English wor...
英文字典查询工具。输入英文单词,获取中文释义并生成两个例句。适用于用户需要查询英文单词时。
mohaiyan3-tal
效率工具 clawhub v1.0.2 1 版本 100000 Key: 无需
★ 0
Stars
📥 649
下载
💾 210
安装
1
版本
#latest

概述

英语词典 (English Dictionary)

查询英语单词的中文释义,并自动生成两个例句。

功能

  • 🔍 查询英语单词释义
  • 📝 输出中文翻译
  • 💬 自动生成两个例句
  • 🔊 显示音标和词性

使用方式

命令行查询

python3 scripts/dict.py <单词>

示例:

python3 scripts/dict.py hello
python3 scripts/dict.py python
python3 scripts/dict.py beautiful

输出格式

📚 HELLO
   音标: /həˈloʊ/
   词性: int./n.

📖 中文释义:
   1. 你好
   2. 喂
   3. 打招呼

💬 例句:
   1. Hello! It's so great to see you again!
      (中文翻译请自行理解或查询)
   2. Hello, could you help me with this?
      (中文翻译请自行理解或查询)

内置词库

当前包含以下基础词汇:

  • hello, world, python, openclaw
  • love, friend, work, study
  • happy, beautiful

扩展配置

如需查询更多单词,建议配置外部词典API:

有道词典 API

# 在 dict.py 中添加
import requests

def youdao_lookup(word):
    url = f"https://dict.youdao.com/jsonresult?q={word}"
    response = requests.get(url)
    return response.json()

牛津词典 API

需要在 https://developer.oxforddictionaries.com/ 申请 API Key

自定义词库

编辑脚本中的 BASIC_DICT 字典,添加新单词:

BASIC_DICT = {
    "yourword": {
        "phonetic": "/pronunciation/",
        "meanings": ["意思1", "意思2"],
        "pos": "词性"
    }
}

例句生成

脚本根据词性自动选择合适的例句模板:

  • 名词 (n.) → 描述事物
  • 动词 (v.) → 描述动作
  • 形容词 (adj.) → 描述特征
  • 副词 (adv.) → 描述方式

注意事项

  1. 当前使用内置基础词库,词汇量有限
  2. 建议配置外部词典API以获取更全面的释义
  3. 例句由模板生成,实际使用时应参考权威例句

版本历史

共 1 个版本

  • v1.0.2 当前
    2026-03-30 02:44 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Nano Pdf

steipete
使用nano-pdf CLI通过自然语言指令编辑PDF
★ 275 📥 114,886
productivity

Weather

steipete
获取当前天气和预报(无需API密钥)
★ 445 📥 226,370
productivity

Obsidian

steipete
操作 Obsidian 仓库(纯 Markdown 笔记)并通过 obsidian-cli 自动化。
★ 432 📥 103,810