Skip to content

Commit 737a65b

Browse files
committed
New tool: translation_review
Send translations to a LLM, let it review the translation and give back both an analysis and a summarized best alternative translation.
1 parent f0382ad commit 737a65b

12 files changed

Lines changed: 1212 additions & 0 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ another language.
155155
Introduction for
156156
users: [https://www.youtube.com/watch?v=g9lZbLaXma0](https://www.youtube.com/watch?v=g9lZbLaXma0)
157157
158+
translation_review.py
159+
: Let a LLM review an existing translation. Optionally generate a PDF report and/or
160+
a translated ODT with the improved suggested translation.
161+
158162
pywikitools/fortraininglib.py
159163
: Our central library with important functions and API calls.
160164

config.example.ini

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,20 @@ deeplendpoint = https://api-free.deepl.com/v2/translate
8686
deeplapikey = MySecretDeepLAPIKey
8787

8888

89+
[translationreview]
90+
# Which mediawiki environment do we read from? 4training, test or local (see family.py)
91+
site = 4training
92+
# OpenAI API configuration (read-only tool, no wiki writes)
93+
openai_api_key = sk-...
94+
model = gpt-4o
95+
# Optional: custom API base URL (leave unset for OpenAI default)
96+
# base_url = https://api.openai.com/v1
97+
reference_language = de
98+
# Delay in seconds between API calls to avoid rate limits
99+
request_delay = 0.5
100+
# Per-request timeout in seconds (retried up to 3 times, then TIMEOUT is written)
101+
timeout = 60
102+
89103
[transfer]
90104
# The mediawiki environment from where we copy it, for example 'test'
91105
source_site = test

0 commit comments

Comments
 (0)