🦀 ClawHub
English Phonetics Batch
by @pe1984
批量为英文单词添加、检查和标注美式国际音标(IPA)。支持从文本文件批量导入单词,自动查询每个单词的美式发音音标,验证现有音标正确性,并输出格式化结果。
💡 Examples
Command Line
# Basic bulk processing (one word per line)
cd scripts/
python english_phonetics_batch.py input_words.txt output_with_phonetics.txtCheck and fix existing file with corrupted phonetics (question marks from encoding errors)
python english_phonetics_batch.py input.txt output.txt --checkOutput as CSV for spreadsheets
python english_phonetics_batch.py words.txt output.csv --format csvLarge vocabulary list - increase delay for safety, more retries
python english_phonetics_batch.py words.txt output.txt --delay 500 --retries 5
Python API
import sys
sys.path.insert(0, 'path/to/english-phonetics-batch/scripts')
from english_phonetics_batch import PhoneticsBatchprocessor = PhoneticsBatch()
results = processor.process_words(["apple", "banana", "cherry"])
processor.save_results(results, "output.txt", format="text")
TERMINAL
clawhub install english-phonetics-batch