# NOTE: # This is a starter layout for the redesigned MTQE demo. # Copy your existing evaluate() function and LANGUAGES dictionary into this file. import os import requests import gradio as gr API_URL = "https://api.pangeanic.com/mtqe/v2/score" API_KEY = os.environ.get("MTQE_API_Key", "") LANGUAGES = { "English": "en-us", "Spanish": "es-es", "French": "fr-fr", "German": "de-de", "Italian": "it-it", "Portuguese": "pt-pt", "Russian": "ru-ru", "Chinese": "zh-cn", "Japanese": "ja-jp", "Korean": "ko-kr", "Arabic": "ar-001", "Thai": "th-th", "Vietnamese": "vi-vn", "Lithuanian": "lt-lt", "Swedish": "sv-se", } def score_color(score): if score >= 90: return "#22C55E" # Green elif score >= 75: return "#84CC16" # Lime elif score >= 60: return "#FACC15" # Yellow elif score >= 40: return "#FB923C" # Orange else: return "#EF4444" # Red def evaluate(source_language, target_language, source, target): payload = { "source": source, "target": target, "source_language": LANGUAGES[source_language], "target_language": LANGUAGES[target_language], "ape": False, } headers = { "accept": "application/json", "Content-Type": "application/json", "X-API-Key": API_KEY, } r = requests.post(API_URL, json=payload, headers=headers, timeout=60) r.raise_for_status() j = r.json() score = j["score"] explanation = j["explanation"] color = score_color(score) html = f"""
{round(score)}
{explanation if explanation else "No issues detected."}
""" return html theme = gr.themes.Soft(primary_hue="orange", radius_size="lg") with gr.Blocks(title="Pangeanic MTQE") as demo: gr.HTML("""
MTQE v2
Reference-free Machine Translation Quality Estimation
""") with gr.Group(): with gr.Row(): source_language = gr.Dropdown( choices=list(LANGUAGES.keys()), value="English", label="Source Language", ) target_language = gr.Dropdown( choices=list(LANGUAGES.keys()), value="Spanish", label="Target Language", ) with gr.Row(): source = gr.Textbox( label="Source Text", lines=3, placeholder="Enter the original text...", scale=1, ) target = gr.Textbox( label="Translation", lines=3, placeholder="Enter the translated text...", scale=1, ) with gr.Row(): evaluate_btn = gr.Button( "Evaluate Translation", variant="primary", scale=3, ) clear = gr.ClearButton(scale=1) gr.HTML("""

Results

""") result = gr.HTML(label="Assessment") evaluate_btn.click( evaluate, inputs=[ source_language, target_language, source, target, ], outputs=result, ) clear.add( [source, target, result] ) gr.HTML("""

Beyond the Demo

This interactive demo showcases the core capabilities of Pangeanic MTQE v2 by estimating translation quality from a source sentence and its translation without requiring reference translations. The complete enterprise platform extends these capabilities with advanced features designed for production localization workflows.

Translation Memory

Incorporate Translation Memory matches into quality estimation.

Glossary Validation

Detect terminology inconsistencies and enforce approved terminology.

Automatic Post-Editing

Automatically improve low-quality translations before delivery.

Human Post-Editing

Prioritize segments requiring human review to optimize post-editing effort.

REST API

Integrate MTQE directly into CAT tools and enterprise localization platforms.

70+ Languages

Supports more than 70 languages and regional variants for multilingual enterprise workflows.

Benchmark Highlights

98.9%
Correct rejection accuracy
6006
Incorrect segments
16
Language pairs
0.49s
Average latency

Benchmark Methodology

Pangeanic MTQE v2 was validated using a representative subset of the ACES multilingual benchmark, covering 6,006 deliberately incorrect translation segments, 16 language pairs, and 68 translation error categories.

  1. Machine translations were generated across sixteen multilingual language pairs.
  2. Thousands of deliberately incorrect translation segments were collected to simulate realistic production errors.
  3. MTQE evaluated each segment using only the source sentence and translated output, without requiring reference translations.
  4. Predictions were compared against manually validated quality labels.
  5. Additional experiments evaluated Automatic Post-Editing recovery performance.

Read the Benchmark Whitepaper

Interested in the Full MTQE Platform?

The complete enterprise platform includes Translation Memory support, Glossary validation, Automatic and Human Post-Editing workflows, batch processing, REST API integration, and multilingual support for more than 70 languages and dialects.

Whitepaper API Docs Website Contact Us
""") demo.launch(theme=theme, css="style.css")