Sentiments
Sentiments is an iOS app written in Swift that analyzes text for positive or negative sentiment. Positive sentiment is highlighted in green and negative sentiment is highlighted in red. The color of the interface reflects the aggregate sentiment of the analyzed text.
Usage
Sentiments
- Open
Sentiment-Analysis.xcworkspace
. - Replace "YOUR_API_KEY" with your API key from HPE Haven OnDemand in
AppConfig.swift
. - Enter text in the text field and press the check button.
Highlight Sentiment Extension
The project includes an experimental action extension for analyzing the sentiment of text on a web page. The extension behaves similarly to the containing app–positive sentiment is highlighted in green and negative sentiment is highlighted in red.
- Launch Safari and navigate to a web page.
- Tap the share button.
- Tap the "Highlight Sentiment" icon.
Note that the extension must first be enabled to complete step 3.
Author
Sentiments was written and designed by Kyle Weiner. It uses Alamofire, SwiftyJSON and HPE Haven OnDemand's Sentiment Analysis API.
License
Copyright (c) 2016 Kyle Weiner. See the LICENSE file for details.