Abdullah Şamil Güser

Artificial Intelligence (AI) Services

Introduction (Lesson 173)

Service Description
Transcribe Converts speech to text.
Translate Translates text between languages.
Comprehend Analyzes text to discern intent and context.
. Sentiment analysis, Custom text classification, Document grouping by topics, Extracting medical information.
Polly Text-to-speech service.
Lex Powers conversational interfaces like chatbots.
. Allows both voice and text-based communication.
. Underlies Amazon’s Alexa consumer products.
Rekognition Analyzes image and video content.
. Identifies objects, people, facial expressions, and inappropriate content; tracks people across frames.
Textract Extracts text and data from documents.
. Works with scanned images, PDFs, and more.
DeepLens A deep learning-enabled video camera for developers.
. A tool for building and testing vision-enabled applications.

Amazon Transcribe (Lesson 174&175)

Steps to Transcribe Audio

  1. Login to AWS Management Console, look for Transcribe service.
  2. Real-Time Transcription Option: Allows for instant transcription via computer mic.
  3. Transcription Jobs: Allows batch transcription, utilizes stored media in S3 for transcription.
  4. Upload the sample audio file in an S3 bucket.
  5. Create Transcription Job:
    • Name the job (e.g., “xgboost sample”).
    • Input file location: S3 path of the audio file.
    • Format: WAV.
    • Output data: Amazon default.
  6. Review Transcribed Text: Analyze the generated text, including confidence scores and timestamps.

Initial Results

Addressing missed words and phrases in the transcription process.

  1. Vocabulary List: Text file with words for Transcribe to detect.
    • Formatting:
      • Hyphens for phrases (e.g., “Los-Angeles”).
      • Dots for acronyms (e.g., “F.B.I.”).
    • Example: Adding “X.G.-Boost” for “XGBoost”.
  2. Upload Vocabulary Files to S3: Place VocabularyList.txt in an S3 bucket.
  3. Create Custom Vocabulary in Transcribe Console:
    • Name the vocabulary (e.g., “xgboost-list”).
    • Select the corresponding file from S3.
  4. Transcription Job with Custom Vocabulary:
    • Create a copy of the original transcription job.
    • Select the newly created custom vocabulary.
    • Analyze the improved output.
  5. Vocabulary Table: Provides additional pronunciation and display information.
    • Columns:
      • Phrase: Word/phrase to recognize.
      • IPA: International Phonetic Alphabet notation.
      • Sounds Like: Breakdown of word pronunciation.
      • Display As: Desired output format.
    • Usage: Specify either IPA or Sounds Like, not both.

Amazon Translate (Lesson 176)

Amazon Comprehend

Lab-1 (Lesson 178)

  1. Accessing Comprehend: Navigate to the Comprehend service in AWS Management Console.
  2. Real-Time Analysis: Use the console for immediate text analysis.
  3. Sample Text Analysis:
    • Example Text: Analysis of XGBoost and Kaggle-related text.
    • Detected Entities: Categorizes “XGBoost” as an organization with varying confidence scores.
    • Sentiment: Neutral with slight positive bias.

Amazon Comprehend Capabilities Overview

Medical Text Analysis

Pricing Comprehend (Lesson 179)

Lab-2 (Lesson 180&181)

Data Preparation Steps

  1. Use SageMaker notebook instance.
  2. Attach AmazonS3ReadOnlyAccess policy for S3 access.
  3. Retrieve dataset from the specified S3 bucket.
  4. Analyze the dataset comprising 10,000 tweets with 45 columns.
    • text (tweet content) and training label (follow-up required or not).

File Format for Comprehend

Building a Custom Classifier

Steps to Build the Classifier

  1. Access Comprehend Management Console: Ensure the same AWS region as the S3 bucket.
  2. Custom Classifier Creation:
    • Name: Twitter follow up.
    • Language: English.
    • Training Data: CSV file from S3 containing tweets and labels.
  3. Role Permission: Create an IAM role for Comprehend to access S3 files.

Batch Prediction

Amazon Polly (Lesson 182)

Introduction to Amazon Polly

Hands-On Lab with Amazon Polly

  1. Accessing Polly: Navigate to Polly in the AWS Management Console.
  2. Text Input: Use a standard example text from previous lectures.
  3. Voice Selection: Experiment with different voices and accents.
  4. Engine Types:
    • Standard: Basic text-to-speech conversion.
    • Neural: Enhanced quality for more lifelike speech.

Customization and Quality Improvement

Amazon Lex (Lesson 183)

Introduction to Amazon Lex

Key Features of Lex

Understanding Lex with Hotel Booking Example

  1. Utterance: User message expressing interest in booking.
  2. Intent: Lex invokes an intent (e.g., book a hotel).
  3. Slots: Collects additional information (e.g., city, dates).
  4. Fulfillment: Completes the booking with all required data.

Hands-On Lab with Amazon Lex

  1. Access Lex Console: Navigate to Lex in AWS Management Console.
  2. Create a Bot: Example bot for booking trips.
  3. Utterances and Intents:
    • Car Booking: Recognizes specific phrases for booking cars.
    • Hotel Booking: Recognizes phrases for booking hotels.
  4. Data Collection: Defines slots for required information (city, dates, car type, etc.).
  5. DataType Specification: Sets data types for each slot (e.g., city, date).
  6. Confirmation Prompt: User can confirm or cancel the booking.
  7. Lambda Integration: Optional for business logic execution.

Amazon Rekognition (Lesson 184)

Introduction to Amazon Rekognition

Hands-On Lab with Rekognition

Image Analysis Examples

  1. Automobiles and Sports: Detected various vehicles, person, skateboard, and associated the scene with sports.
  2. City Skyline: Identified urban environment, city, highrise.
  3. Warplanes and Bombers: Recognized aircraft, misinterpreted as warplanes.
  4. Cat: Precisely identified breed as Abyssinian cat.

Features

Conclusion

Amazon Textract (Lesson 185)

Hands-On Example with Textract

  1. Access Textract: Navigate to Textract in the AWS Management Console.
  2. Analyzing a Document:
    • Sample Form: Extracts raw text, entry fields, and table data.
    • Process: Upload document for analysis by Textract.

Document Analysis Examples

  1. AWS Machine Learning Specialty Exam Guide (PDF):
    • Content: Sections, tables, and varied text.
    • Textract Analysis: Run Textract on the PDF document.
    • Outcome: Partially successful extraction of text and tables.
  2. Results and Downloads
    • Raw Text: Downloadable as a text file containing the content of the PDF.
    • Table Data: Extracted and available in CSV format.
    • Potential Applications: Feeding data into Elasticsearch or other search tools for document searchability.