Verify the configuration is correct by executing, "aws s3 ls" to output your bucket name (bucket name will be unique):
Execute "aws s3 ls <bucket-name>" to output the text file pos_sentiment__leaves_of_grass.txt" in the bucket.
Create a new S3 bucket with the following command (to note: your bucket name needs to be unique. Refer to the S3 "Rules for Bucket Naming" for specific details):
In the command prompt, navigate to the "neg_sentiment__dracula.txt" location Execute, "aws s3 cp neg_sentiment__dracula.txt" to import the text file to your S3 bucket.
Navigate to the "peter_pan.txt" file location with your command line. Import the file "peter_pan.txt" to your S3 bucket (named "aws-test-ml-and-ai-two" in this example) with the following command:
Navigate to your Desktop in the command line. Create a new local folder named "s3_exported_files" with the command "mkdir s3_exported_files"
Next, recursively export both files ("neg_sentiment__dracula.txt" and "peter_pan.txt") from the S3 bucket to your local directory with the "- -recursive" parameter. See below for the command's execution.
Verify the objects were exported successfully to your local folder with the, "dir" command (see below):
In this section, we will learn about display text analysis output using a partial text file input in the API explorer. We will be exploring API's is a skill to save development time by making sure the output is in a desired format for your project. Thus, we will test Comprehend's text analysis features.
We will consider an example suppose you are an entrepreneur creating a chatbot. You identified a business topic and corresponding text documents with content that will allow the chatbot to make your business successful. Your next step is to identify/verify an AWS service to parse the text document for sentiment, language, key phrases, and entities. Before investing time in writing a complete program, you want to test the AWS service's features via the AWS management console's interface. To ensure that it happen correctly, you will need to have search the web for an article (written in English or Spanish) that contains a subject matter (sports, movies, current events, etc.) that you are interested. And, also AWS Management Console accessible via the root user's account
You are aware exploring API's is a skill to save development time by making sure the output is in a desired format for your project.
Click in the Search bar of AWS Services to search the service name
Search the Amazon Comprehend option and select the option you will be directed. Get started screen.
You will be directed to the API explorer. Navigation to Topic modeling and Documentation. The middle is a GUI to explore the API, and the right side provides real-time output for text input.
Click clear text to clear all default services. Navigate to open the following URL in a new tab http://www.gutenberg.org/cache/epub/1322/pg1322.txt
Copy the first poem, and paste it in the Explorer and click Analyze to see the output
Review the right side of the screen for Entity, Key phrases, Language, and scroll down to view Sentiment.
You now know how to explore an API, and how to display sentiment output for the same.