Amazon Translate Developer Guide Amazon Translate Developer Guide
Total Page:16
File Type:pdf, Size:1020Kb
Amazon Translate Developer Guide Amazon Translate Developer Guide Amazon Translate: Developer Guide Copyright © Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon. Amazon Translate Developer Guide Table of Contents What Is Amazon Translate? ................................................................................................................. 1 Supported Languages and Language Codes ................................................................................... 1 Use Cases .................................................................................................................................. 3 First-Time User .......................................................................................................................... 4 Amazon Translate Pricing ............................................................................................................ 4 How It Works .................................................................................................................................... 5 Automatic Language Detection .................................................................................................... 5 Exception Handling .................................................................................................................... 5 Next Steps ................................................................................................................................ 6 Getting Started .................................................................................................................................. 7 Step 1: Set Up an Account .......................................................................................................... 7 Sign Up for AWS ................................................................................................................ 7 Create an IAM User ............................................................................................................ 7 Next Step .......................................................................................................................... 8 Step 2: Set Up the AWS CLI ........................................................................................................ 8 Next Step .......................................................................................................................... 9 Step 3: Getting Started (Console) ................................................................................................. 9 Next Step ........................................................................................................................ 10 Step 4: Getting Started (AWS CLI) .............................................................................................. 10 Translate Text Using the Command Line ............................................................................. 11 Translate Text Using a JSON File ........................................................................................ 11 Next Step ........................................................................................................................ 12 Step 5: Getting Started (SDK) .................................................................................................... 12 Using the SDK for Java ..................................................................................................... 12 Using the AWS SDK for Python .......................................................................................... 13 Using the Mobile SDK for Android ...................................................................................... 15 Using the Mobile SDK for iOS ............................................................................................ 16 Translation Processing Modes ............................................................................................................ 18 Real-Time Translation ............................................................................................................... 18 Asynchronous Batch Processing .................................................................................................. 18 Region Availability ............................................................................................................ 18 Prerequisites .................................................................................................................... 19 Running a Job ................................................................................................................. 20 Monitoring and Analyzing ................................................................................................. 24 Getting Results ................................................................................................................ 25 Customizing Your Translations ........................................................................................................... 27 Customizing with Custom Terminology ....................................................................................... 27 How does this work? ........................................................................................................ 28 Creating a Custom Terminology ......................................................................................... 28 Using Custom Terminologies .............................................................................................. 29 Encrypting Your Terminology ............................................................................................. 30 Best Practices .................................................................................................................. 30 Customizing with Parallel Data .................................................................................................. 31 Region Availability ............................................................................................................ 32 Parallel Data Input Files for Amazon Translate ..................................................................... 32 Adding Parallel Data ......................................................................................................... 36 Viewing and Managing Parallel Data ................................................................................... 38 Examples ......................................................................................................................................... 42 Using Amazon Polly with Amazon Translate ................................................................................ 42 Code ............................................................................................................................... 42 Using Amazon Translate to Translate a Chat Channel .................................................................... 46 Using Amazon Translate with DynamoDB .................................................................................... 54 Example Code .................................................................................................................. 55 Using Amazon Translate to Translate a Web Page ......................................................................... 57 iii Amazon Translate Developer Guide Using Amazon Translate to Translate Large Documents ................................................................. 60 Using Signature Version 4 with Amazon Translate ........................................................................ 62 Setting Up ....................................................................................................................... 62 Code ............................................................................................................................... 62 Security ........................................................................................................................................... 66 Data Protection ........................................................................................................................ 66 Encryption at Rest ............................................................................................................ 67 Encryption in Transit ......................................................................................................... 67 Identity and Access Management ............................................................................................... 68 Audience ......................................................................................................................... 68 Authenticating With Identities ............................................................................................ 68 Managing Access Using Policies .......................................................................................... 70 How Amazon Translate Works with IAM .............................................................................. 72 Identity-Based Policy Examples .........................................................................................