Skip to content

Latest commit

 

History

History
32 lines (19 loc) · 1.57 KB

README.md

File metadata and controls

32 lines (19 loc) · 1.57 KB

Sentiments

Platform: iOS Sentiments Example

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

  1. Open Sentiment-Analysis.xcworkspace.
  2. Replace "YOUR_API_KEY" with your API key from HPE Haven OnDemand in AppConfig.swift.
  3. 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.

  1. Launch Safari and navigate to a web page.
  2. Tap the share button.
  3. 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.