Porozumění textu

Introduction to AWS Boto in Python

Maksim Pecherskiy

Data engineer

Konzola AWS Translate

Konzole AWS Translate

Introduction to AWS Boto in Python

Překlad textu

Inicializace klienta

translate = boto3.client('translate', 
    region_name='us-east-1', 
    aws_access_key_id=AWS_KEY_ID, aws_secret_access_key=AWS_SECRET)

Překlad textu

response = translate.translate_text(
    Text='Hello, how are you?', 
    SourceLanguageCode='auto', 
    TargetLanguageCode='es')
Introduction to AWS Boto in Python

Překlad textu

Překlad textu

Introduction to AWS Boto in Python

Překlad textu

translated_text = translate.translate_text(
    Text='Hello, how are you?', 
    SourceLanguageCode='auto', 
    TargetLanguageCode='es')['TranslatedText']
Introduction to AWS Boto in Python

Detekce jazyka

Inicializace klienta boto3 Comprehend

comprehend = boto3.client('comprehend', 
    region_name='us-east-1', 
    aws_access_key_id=AWS_KEY_ID, aws_secret_access_key=AWS_SECRET)

Detekce dominantního jazyka

response = comprehend.detect_dominant_language(
  Text="Hay basura por todas partes a lo largo de la carretera.")
Introduction to AWS Boto in Python

Detekce jazyka

Detekce jazyka

Introduction to AWS Boto in Python

Analýza sentimentu

Analýza sentimentu

Introduction to AWS Boto in Python

Analýza sentimentu

Detekce sentimentu textu

response = comprehend.detect_sentiment(
  Text="DataCamp students are amazing.", 
  LanguageCode='en')
Introduction to AWS Boto in Python

Analýza sentimentu

Analýza sentimentu

Introduction to AWS Boto in Python

Analýza sentimentu

sentiment = comprehend.detect_sentiment(
  Text='Maksim is amazing.', 
  LanguageCode='en')['Sentiment']
Introduction to AWS Boto in Python

Opakování

Inicializace klienta

translate = boto3.client('translate', 
    region_name='us-east-1', 
    aws_access_key_id=AWS_KEY_ID, aws_secret_access_key=AWS_SECRET)

Překlad textu

response = translate.translate_text(
    Text='Hello, how are you?', 
    SourceLanguageCode='auto', 
    TargetLanguageCode='es')
Introduction to AWS Boto in Python

Opakování

Inicializace klienta boto3 Comprehend

comprehend = boto3.client('comprehend', 
    region_name='us-east-1', 
    aws_access_key_id=AWS_KEY_ID, aws_secret_access_key=AWS_SECRET)

Detekce dominantního jazyka

response = comprehend.detect_dominant_language(
  Text="Hay basura por todas partes a lo largo de la carretera.")
Introduction to AWS Boto in Python

Opakování

Detekce sentimentu textu

response = comprehend.detect_sentiment(
  Text="Maksim is amazing.", 
  LanguageCode='en')
Introduction to AWS Boto in Python

Pojďme cvičit!

Introduction to AWS Boto in Python

Preparing Video For Download...