Sentiment Analysis Addin For Excel On Mac

Sentiment Analysis Addin For Excel On Mac

Easy to use text analytics / sentiment analysis / text categorisation. Is not compatible with the Mac version of Excel; Simply Sentiment is designed to work with the. Simply Sentiment is an Excel add-in (.xlam file) that enables you to carry out. But if the survey includes a question where respondents can write text, it’s difficult to determine how many are positive, negative, or neutral. A free add-in from Microsoft makes this sentiment analysis possible in Excel 2013-2016.

-->

Excel makes it easy to call web services directly without the need to write any code.

Steps to Use an Existing web service in the Workbook

  1. Open the sample Excel file, which contains the Excel add-in and data about passengers on the Titanic.

    Note

    You will see the list of the Web Services related to the file and at the bottom a checkbox for 'Auto-predict'. If you enable auto-predict the predictions of all your services will be updated every time there is a change on the inputs. If unchecked you will have to click on 'Predict All' for refresh. For enabling auto-predict at a service level go to step 6.

  2. Choose the web service by clicking it - 'Titanic Survivor Predictor (Excel Add-in Sample) [Score]' in this example.

  3. This takes you to the Predict section. This workbook already contains sample data, but for a blank workbook you can select a cell in Excel and click Use sample data.

  4. Select the data with headers and click the input data range icon. Make sure the 'My data has headers' box is checked.

  5. Under Output, enter the cell number where you want the output to be, for example 'H1' here.

  6. Click Predict. If you select the 'auto-predict' checkbox any change on the selected areas (the ones specified as input) will trigger a request and an update of the output cells without the need for you to press the predict button.

Deploy a web service or use an existing Web service. For more information on deploying a web service, see Tutorial 3: Deploy credit risk model.

Get the API key for your web service. Where you perform this action depends on whether you published a Classic Machine Learning web service of a New Machine Learning web service.

Use a Classic web service

  1. In Machine Learning Studio (classic), click the WEB SERVICES section in the left pane, and then select the web service.

  2. Copy the API key for the web service.

  3. On the DASHBOARD tab for the web service, click the REQUEST/RESPONSE link.

  4. Look for the Request URI section. Copy and save the URL.

Note

It is now possible to sign into the Azure Machine Learning Web Services portal to obtain the API key for a Classic Machine Learning web service.

Use a New web service

  1. In the Azure Machine Learning Web Services portal, click Web Services, then select your web service.
  2. Click Consume.
  3. Look for the Basic consumption info section. Copy and save the Primary Key and the Request-Response URL.

Steps to Add a New web service

  1. Deploy a web service or use an existing Web service. For more information on deploying a web service, see Tutorial 3: Deploy credit risk model.

  2. Click Consume.

  3. Look for the Basic consumption info section. Copy and save the Primary Key and the Request-Response URL.

  4. In Excel, go to the Web Services section (if you are in the Predict section, click the back arrow to go to the list of web services).

  5. Click Add Web Service.

  6. Paste the URL into the Excel add-in text box labeled URL.

  7. Paste the API/Primary key into the text box labeled API key.

  8. Click Add.

  9. To use the web service, follow the preceding directions, 'Steps to Use an Existing web Service.'

Sharing Your Workbook

If you save your workbook, then the API/Primary key for the web services you have added is also saved. That means you should only share the workbook with individuals you trust.

Ask any questions in the following comment section or on our forum.

-->

The Text Analytics API's Sentiment Analysis feature evaluates text and returns sentiment scores and labels for each sentence. This is useful for detecting positive and negative sentiment in social media, customer reviews, discussion forums and more. The AI models used by the API are provided by the service, you just have to send content for analysis.

Tip

Text Analytics also provides a Linux-based Docker container image for language detection, so you can install and run the Text Analytics container close to your data.

Sentiment Analysis supports a wide range of languages, with more in preview. For more information, see Supported languages.

Concepts

The Text Analytics API uses a machine learning classification algorithm to generate a sentiment score between 0 and 1. Scores closer to 1 indicate positive sentiment, while scores closer to 0 indicate negative sentiment. Sentiment analysis is performed on the entire document, instead of individual entities in the text. This means sentiment scores are returned at a document or sentence level.

The model used is pre-trained with an extensive corpus of text and sentiment associations. It utilizes a combination of techniques for analysis, including text processing, part-of-speech analysis, word placement, and word associations. For more information about the algorithm, see Introducing Text Analytics. Currently, it isn't possible to provide your own training data.

There's a tendency for scoring accuracy to improve when documents contain fewer sentences rather than a large block of text. During an objectivity assessment phase, the model determines whether a document as a whole is objective or contains sentiment. A document that's mostly objective doesn't progress to the sentiment detection phase, which results in a 0.50 score, with no further processing. For documents that continue in the pipeline, the next phase generates a score above or below 0.50. The score depends on the degree of sentiment detected in the document.

Sentiment Analysis versions and features

The Text Analytics API offers two versions of Sentiment Analysis - v2 and v3. Sentiment Analysis v3 (Public preview) provides significant improvements in the accuracy and detail of the API's text categorization and scoring.

Note

  • The Sentiment Analysis v3 request format and data limits are the same as the previous version.
  • Sentiment Analysis v3 is available in the following regions: Australia East, Central Canada, Central US, East Asia, East US, East US 2, North Europe, Southeast Asia, South Central US, UK South, West Europe, and West US 2.
FeatureSentiment Analysis v2Sentiment Analysis v3
Methods for single, and batch requestsXX
Sentiment scores for the entire documentXX
Sentiment scores for individual sentencesX
Sentiment labelingX
Model versioningX

Sentiment scoring

Sentiment Analysis v3 classifies text with sentiment labels (described below). The returned scores represent the model's confidence that the text is either positive, negative, or neutral. Higher values signify higher confidence.

Sentiment labeling

Sentiment Analysis v3 can return scores and labels at a sentence and document level. The scores and labels are positive, negative, and neutral. At the document level, the mixed sentiment label also can be returned without a score. The sentiment of the document is determined below:

Sentence sentimentReturned document label
At least one positive sentence is in the document. The rest of the sentences are neutral.positive
At least one negative sentence is in the document. The rest of the sentences are neutral.negative
At least one negative sentence and at least one positive sentence are in the document.mixed
All sentences in the document are neutral.neutral

Model versioning

Note

Model versioning for sentiment analysis is available starting in version v3.0-preview.1.

Version 3 of the Text Analytics API lets you choose the model version that is most current for your data. Use the optional model-version parameter to select the version of the model that is desired for your requests. If this parameter isn't specified the API will default to latest, the latest stable version. Even though you can use the newest model-version in any request, only some features are updated in each version. The table below describes which features have been updated in each model version:

Model versionFeatures updatedLatest version for:
2020-02-01Entity recognitionEntity recognition
2019-10-01Entity recognition, Sentiment analysisLanguage detection, Key phrase extraction, Sentiment analysis

Each response from the v3 endpoints includes a model-version field specifying the model version that was used.

See What's new for details on the updates for these model versions.

Example C# code

You can find an example C# application that calls this version of Sentiment Analysis on GitHub.

Sentiment scoring

The sentiment analyzer classifies text as predominantly positive or negative. It assigns a score in the range of 0 to 1. Values close to 0.5 are neutral or indeterminate. A score of 0.5 indicates neutrality. When a string can't be analyzed for sentiment or has no sentiment, the score is always 0.5 exactly. For example, if you pass in a Spanish string with an English language code, the score is 0.5.

Sentiment Analysis Addin For Excel On Mac

Sending a REST API request

Preparation

Sentiment analysis produces a higher-quality result when you give it smaller amounts of text to work on. This is opposite from key phrase extraction, which performs better on larger blocks of text. To get the best results from both operations, consider restructuring the inputs accordingly.

You must have JSON documents in this format: ID, text, and language.

Document size must be under 5,120 characters per document. You can have up to 1,000 items (IDs) per collection. The collection is submitted in the body of the request.

Structure the request

Create a POST request. You can use Postman or the API testing console in the following reference links to quickly structure and send one.

Set the HTTPS endpoint for sentiment analysis by using either a Text Analytics resource on Azure or an instantiated Text Analytics container. You must include the correct URL for the version you want to use. For example:

Note

You can find your key and endpoint for your Text Analytics resource on the azure portal. They will be located on the resource's Quick start page, under resource management.

https://<your-custom-subdomain>.cognitiveservices.azure.com/text/analytics/v3.0-preview.1/sentimentTogainu no chi download mac.

https://<your-custom-subdomain>.cognitiveservices.azure.com/text/analytics/v2.1/sentiment

Set a request header to include your Text Analytics API key. In the request body, provide the JSON documents collection you prepared for this analysis.

Example Sentiment Analysis request

The following is an example of content you might submit for sentiment analysis. The request format is the same for both versions of the API.

Post the request

Analysis is performed upon receipt of the request. For information on the size and number of requests you can send per minute and second, see the data limits section in the overview.

The Text Analytics API is stateless. No data is stored in your account, and results are returned immediately in the response.

View the results

The sentiment analyzer classifies text as predominantly positive or negative. It assigns a score in the range of 0 to 1. Values close to 0.5 are neutral or indeterminate. A score of 0.5 indicates neutrality. When a string can't be analyzed for sentiment or has no sentiment, the score is always 0.5 exactly. For example, if you pass in a Spanish string with an English language code, the score is 0.5.

Output is returned immediately. You can stream the results to an application that accepts JSON or save the output to a file on the local system. Then, import the output into an application that you can use to sort, search, and manipulate the data.

Sentiment Analysis v3 example response

Responses from Sentiment Analysis v3 contain sentiment labels and scores for each analyzed sentence and document. documentScores is not returned if the document sentiment label is mixed.

Sentiment Analysis v2 example response

Responses from Sentiment Analysis v2 contain sentiment scores for each sent document.

Summary

In this article, you learned concepts and workflow for sentiment analysis using the Text Analytics API. In summary:

  • Sentiment Analysis is available for selected languages in two versions.
  • JSON documents in the request body include an ID, text, and language code.
  • The POST request is to a /sentiment endpoint by using a personalized access key and an endpoint that's valid for your subscription.
  • Response output, which consists of a sentiment score for each document ID, can be streamed to any app that accepts JSON. For example, Excel and Power BI.

See also

Sentiment Analysis Addin For Excel On Mac
© 2020