🤖 AI/ML

Machine Translation

Machine Translation

Automatic translation between languages. Neural network-based NMT is the mainstream.

📖 Detailed Explanation

Machine translation (MT) is technology that automatically converts one natural language into another by computer. As of 2024-2025, neural machine translation (NMT) is the mainstream, and large language models (LLMs) such as GPT-4, Claude, and Gemini have dramatically improved translation quality.

The history of machine translation began with rule-based systems (RBMT) in the 1950s, then progressed to statistical approaches (SMT) in the 1990s and neural approaches (NMT) after 2014. In particular, since the emergence of the Transformer architecture in 2017, translation quality using the Attention mechanism has improved rapidly.

The core principle of NMT is the encoder-decoder structure. The encoder converts the source text into a high-dimensional vector, and the decoder generates the target language from it. LLM-based translation adds contextual understanding, nuance detection, and domain-specific translation.

In practice, machine translation is essential for document localization, customer support, and real-time communication. Along with services such as DeepL, Google Translate, and Papago, GPT-4-based translation shows professional-translator-level quality, and the post-editing (MTPE) workflow has become standard.

💻 Code Example

# 기계 번역 - OpenAI GPT-4 활용
from openai import OpenAI

client = OpenAI()

def translate_text(text: str, source_lang: str, target_lang: str) -> str:
    """GPT-4 기반 고품질 번역"""
    response = client.chat.completions.create(
        model="gpt-4-turbo",
        messages=[
            {
                "role": "system",
                "content": f"You are a professional translator. Translate from {source_lang} to {target_lang}. Preserve tone, style, and cultural nuances."
            },
            {"role": "user", "content": text}
        ],
        temperature=0.3  # 일관된 번역을 위해 낮은 temperature
    )
    return response.choices[0].message.content

# 사용 예시
korean_text = "인공지능 기술이 우리 삶을 혁신적으로 변화시키고 있습니다."
english = translate_text(korean_text, "Korean", "English")
print(f"번역 결과: {english}")

# Hugging Face Transformers 활용 (오프라인/저비용)
from transformers import MarianMTModel, MarianTokenizer

def translate_with_marian(text: str, model_name: str = "Helsinki-NLP/opus-mt-ko-en"):
    """오픈소스 모델 기반 번역"""
    tokenizer = MarianTokenizer.from_pretrained(model_name)
    model = MarianMTModel.from_pretrained(model_name)

    inputs = tokenizer(text, return_tensors="pt", padding=True)
    outputs = model.generate(**inputs, max_length=512)
    return tokenizer.decode(outputs[0], skip_special_tokens=True)

📊 Performance & Cost

Comparison of major machine translation services as of January 2025:

Services Quality (BLEU) Cost Features
GPT-4 Turbo 90+ $10/1M tokens Best context understanding, domain adaptation
DeepL Pro 88+ $25/month (5M characters) Strongest for European languages, API provided
Google Translate 85+ $20/1M characters 133 languages, real-time
Papago (Naver) 87+ (Korean-English) 10,000 characters/day free Optimized for Korean
Helsinki-NLP (open source) 80+ Free Self-hosting possible

🗣️ Say It Like This in Practice

💬 In a Meeting
"Introducing GPT-4-based machine translation with an MTPE (Machine Translation Post-Editing) workflow into the localization pipeline can cut translation costs by 60% while reducing TAT (Turn Around Time) from 3 days to 1 day."
💬 In an Interview
"The core challenge of machine translation is domain adaptation. When applying a general-purpose NMT model to the legal or medical domain, glossary integration and fine-tuning are essential. I have experience improving legal document translation accuracy by 35% by applying a custom glossary to the DeepL API."
💬 In a Technical Discussion
"The advantage of LLM-based translation is zero-shot domain adaptation. By injecting a style guide through few-shot prompting, you can produce translations that maintain the brand's tone and manner without traditional NMT fine-tuning."

Take a mock interview on this topic → WIA SOOM AI Interview · Start for free

⚠️ Common Mistakes & Cautions

❌
Deploying machine translation output without review

In legal, medical, and financial fields, mistranslations can lead to legal liability. Pay particular attention to errors in numbers, dates, and proper nouns.

❌
Translating sentence by sentence without context

For text with pronouns or omitted subjects, you need to provide the context of the whole document to get an accurate translation.

✅
The right way: build an MTPE workflow

Combining machine translation with post-editing by professional translators is the best way to secure both cost efficiency and quality. Run a QA checklist alongside it.

🔗 Related Terms

📚 Learn More