0% found this document useful (0 votes)
15 views10 pages

Machine__Translation

The document discusses Machine Translation (MT) as an AI-driven method for translating text between languages, emphasizing its importance in enhancing global communication and business expansion. It outlines various types of MT, including Rule-Based, Statistical, and Neural Machine Translation, and describes the processes involved in MT, such as text preprocessing and model training. Additionally, it highlights challenges like language ambiguity and cultural context while noting advancements in deep learning models like Transformers that improve translation quality.

Uploaded by

yashaswinivmipuc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views10 pages

Machine__Translation

The document discusses Machine Translation (MT) as an AI-driven method for translating text between languages, emphasizing its importance in enhancing global communication and business expansion. It outlines various types of MT, including Rule-Based, Statistical, and Neural Machine Translation, and describes the processes involved in MT, such as text preprocessing and model training. Additionally, it highlights challenges like language ambiguity and cultural context while noting advancements in deep learning models like Transformers that improve translation quality.

Uploaded by

yashaswinivmipuc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

UE22AM343BB5

Large Language Models and Their Applications

Dr. Shylaja S S
Director of Cloud Computing & Big Data (CCBD), Centre for
Data Sciences & Applied Machine Learning (CDSAML)
Department of Computer Science and Engineering
[email protected]
Machine Translation in NLP
What is Machine Translation?
• Machine Translation (MT) is the automatic translation of text between languages
using AI.
• Used in NLP applications to bridge language gaps and improve global
communication.
Why is Machine Translation Important?
• Bridges Language Barriers – Enables global communication.
• Saves Time & Effort – Automates translations instead of manual work.
• Enhances Business Expansion – Helps companies operate in multilingual markets.
• Aids Education & Research – Provides access to multilingual information.
Types of Machine Translation

1. Rule-Based Machine Translation (RBMT) – Uses predefined linguistic


rules.
2. Statistical Machine Translation (SMT) – Learns from bilingual text using
statistics.
3. Neural Machine Translation (NMT) – Uses deep learning models like
Transformers.
How Does Machine Translation Work?
• Text Preprocessing – Tokenization, Stopword Removal, Lemmatization.
• Language Encoding – Word Embeddings (Word2Vec, FastText) or
Transformers (BERT, GPT).
• Translation Model – Seq2Seq Models (LSTMs, GRUs), Transformer
Models (BERT, T5, mBART).
• Postprocessing – Grammar correction, context verification.
Google Translate API Example (Python)
```python
from googletrans import Translator

translator = Translator()
text = "Hello, how are you?"
translated_text = translator.translate(text, dest="fr")
print("Translated Text:", translated_text.text)
```
Neural Machine Translation using MarianMT
```python
from transformers import MarianMTModel, MarianTokenizer

model_name = "Helsinki-NLP/opus-mt-en-fr"
tokenizer = MarianTokenizer.from_pretrained(model_name)
model = MarianMTModel.from_pretrained(model_name)

text = "Hello, how are you?"


encoded_text = tokenizer(text, return_tensors="pt", padding=True)
translated_tokens = model.generate(**encoded_text)
translated_text = tokenizer.decode(translated_tokens[0], skip_special_tokens=True)

print("Translated Text:", translated_text)


```
Using OpenAI's GPT for Translation (Python)
```python
from transformers import pipeline

translator = pipeline("translation_en_to_fr")
text = "Hello, how are you?"
translated_text = translator(text)[0]["translation_text"]
print("Translated Text:", translated_text)
```
Challenges in Machine Translation

• Ambiguity in Language – Words with multiple meanings can cause


errors.
• Grammar & Syntax Issues – Some translations may be incorrect.
• Cultural Context – Direct translations may not capture cultural nuances.
• Domain-Specific Language – Technical terms require specialized models.
Conclusion

• Machine Translation has improved significantly with deep learning.


• Transformers like BERT, mBART, and MarianMT provide high-quality
translations.
• Challenges still exist in context understanding and language nuances.
• Ongoing research aims to improve accuracy and contextual awareness.
Thank You
Dr. Shylaja S S
Director of Cloud Computing & Big Data (CCBD),
Centre for Data Sciences & Applied Machine
Learning (CDSAML)
Department of Computer Science and Engineering
[email protected]

You might also like