Git Product home page Git Product logo

ai-demos-translatesentiments's Introduction

Banner

Why am I here?

Welcome to the Translate Sentiments Demo. As you may or may not know, you can use Amazon Translate to translate text and files, and Amazon Comprehend to obtain insights from text. Amazon Comprehend is currently available for the following languages, and you may want to extract information from a non supported language. The objective of this demo is for you to combine both services and obtain insights from any language supported by Amazon Translate.

Why do I need?

  • Web Browser I imagine you already have one if you are reading this.
  • AWS Account If you don't already have an account or you have not been handed one as part of a workshop, please visit the following link!
  • Text editor Don't worry if you are not a Coding Guru, I promise setting the demo up will be very easy!

What am I going to build?

As mentioned before, the objective is for you to test Amazon Translate and Amazon Comprehend together, so for this reason you are going to deploy all the infrastructure needed automatically with an AWS CloudFormation template already created.

I want to run the webapp locally on my computer!

If you choose to deploy this semi-automated infrastructure, Amazon API Gateway and AWS Lambda (with the appropriate role to call Amazon Polly) will be deployed and configured. You will also have to open the static assets locally on your computer and make a small change in the code which I will specify you later.

Semi-Automated

  • Step 1: Deploy the AWS Infrastructure:

    • Launch the following AWS CloudFormation Template in your account (The link will automatically open the AWS CloudFormation console).

    Note: If you are already running this CloudFormation Stack with the predefined Stack Name, please change the name of the new stack.

    • All parameters are already configured so just select your Stack Name, check the AWS CloudFormation acknowledgements and click Create stack.
    • Wait until the stack goes into the CREATE_COMPLETE status, then go to the Outputs tab.
    • You will see an output named ApiEndpoint. Take note of the url, as you will use it later.
  • Step 2: Download the necessary static files to run the webapp and configure the API call.

    • Download the following .zip file and decompress it!

    • Open the api-gateway-endpoint.js located in the js folder and insert the API url from the previous step in the first line, where you will see the follwing code:

      const apiEndpoint='REPLACE-THIS-WITH-THE-API-ENDPOINT';

  • Step 3: You are now ready to run index.html on your local server and start testing the translations.

    • How do I create a local server? -> Navigate to the assets folder with cd PathToYourAssetsFolderand run the following command python -m SimpleHTTPServer. Next, just head to your browser and type in localhost:8000and you should see the Translate Sentiments Panel.

What should I be seeing?

If you followed correctly the previous steps you should be able to see the Translate Sentiments Panel.

Translate Sentiments Panel

ai-demos-translatesentiments's People

Contributors

danystinson avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.