translation.aligned
Aligned translation: the map between a source span and its translation is exact because the cuts are ours.
Aligned
AlignedConfig
The wording of the two prompts.
AlignedTranslator
ask(prompt) -> reply text: any model, local or remote.
Construct with AlignedTranslator(ask: Callable[[str], str], config: AlignedConfig \| None = None).
Segment
numbers_match
parse_numbered
reply that read [k] text with 1 <= k <= n.
segments
translation.checks
Checks on a translation, as a function check(source, translation) -> [problems]; an empty list means it passed.
basic
make_check
basic, plus the term-list gate of ladygraph.llm.translate when a Glossary is given, plus any checks of your own.
translation.escalation
Escalation: a cheap step first; stronger steps only for what the check rejects.
Attempt
Outcome
Step
escalate
translation.hints
Term hints: the glossary entries that occur in a text, as a note appended to a translation prompt.
term_hint
glossary found in text, longest first, or "" when none is.
translation.verify
Verification: a second model reads (source, translation) pairs and reports what is wrong, in a fixed vocabulary of error types.
LlmVerifier
Construct with LlmVerifier(llm: LlmClient, *, source_language: str = 'the source language', target_language: str = 'English', domain: str = 'text', batch: int = 8).
Verdict
VerdictError
Verifier
Construct with Verifier(*args, **kwargs).
verifier_check
check(source, translation) -> problems) backed by a verifier: a verdict in fail_on becomes the problems.