5. Reviews Aggregation
• Customer Reviews from Review Sites
o Yelp, Edmunds, Facebook etc.
o Metrics
• Overall Rating
• Reviews
• Star Rating
• Aggregation Models
o API
o Raw Webpage Analysis
6. Reviews Aggregation - API
YelpTemplate yelp = new YelpTemplate(
'yelp.consumerKey’, 'yelp.consumerSecret’,
'yelp.token’,'yelp.tokenSecret')
Business business = yelp.findById(‘bizId’)
def overallRating = business.rating
def reviews = business.reviews
Setup:
1.Pre-negotiated security tokens
2.Rate limits
7. Reviews Aggregation - Toolkit
o Web Based Extraction Tools
• Import.IO ( http://import.io)
oConvert web pages to table data.
oLittle or No Coding
9. Reputation Monitoring
• “Understanding or Influencing of an Individual’s or
Business’s Reputation. “
• Look for Unstructured Information online.
• Sentiment Analysis.
• Sentiment Analysis – Computationally Identify and
Categorize Opinion in a Piece of Text
10. Reputation Monitoring
• Employ Techniques to find Information Online
o Web Crawlers
o RSS
o Social Media Data
11. Web Crawling
• 80legs.com , Scrapy.org etc.
• Provide crawlable sites, depth, and # of results to
return.
• Plugins to filter returned html
Create:
POST https://api_token:@api.80legs.com/v2/crawls/{CRAWL_NAME}
Status:
GET https://api_token:@api.80legs.com/v2/crawls/{CRAWL_NAME}
Results:
GET https://api_token:@api.80legs.com/v2/results/{CRAWL_NAME}
12. Other Sources
• RSS:
o API for RSS/Atom Feeds
o Rome/ Apache Abdera
URL feedUrl = new URL(url);
SyndFeed feed = fetcher.retreiveFeed(url)
doStuff(feed.articles)
13. Other Sources
• Social Mentions
POST
http://api2.socialmention.com/search?q=“socalcodecamp”&f=json&
t=all&lang=en&apiKey=123dhdh7
14. Sentiment Analysis
• Why Lots of Opinions on the web
• Machine Learning/ Lexicon Based
Machine Learning Based
• Collect Data
• Label Data
• Prepare and Upload Data
• Predict new Data
• Iterate
Lexicon based
• Tokenize Words,
• Lematize Them ( good gud .. )
• Assign negators/ intensifiers
15. Sentiment Analysis - Tools
• Google Predictions API
• Stanford NLP
• Init training set
• For each sentence
o Break into words
o Pass each word/phrase into training set to classify sentiment
o Combine each classified word and sentiment to compute overall
sentiment.
17. Content Discovery
• Discover Relevant Content
• Purpose : To Engage more audience and attract
Leads
• Different Channels
o RSS
o Social Trends – Youtube , Twitter, Topsy…
• Youtube Trends API
• Twitter Trends API
o Local News Feeds
o Custom APIs
18. Trends API
• GET https://api.twitter.com/1.1/trends/place.json?id=1
19. Content Publishing
• Publishing Interesting Content to engage Users
• Oauth Permission to Act on Client’s behalf
o Provides Client Applications a ‘Secure’ Access to Server Resources on Behalf of a
resource Owner
• Publish to Multiple Channels at once.
Twitter4j twit4j = Twitterfactory.getInstance()
twit4j.setAuthorizationCode(…..)
Tweet createdTweet = twit4j.post(“status Update”)
FacebookClient client = new FacebookClient();
client.publish(“Message”, wallId);
20. • Most Popular
o Facebook, Twitter, LinkedIn, Pinterest…
• Twitter Post
21. Realtime Notifications
• Notifications on your social media Actions
• Techniques
o HTTP Push
o Persistent Connections
• JVM Libraries Available
o Twitter4j, HTTP APIs, Native Java APIs
• Try Twitter
22. Analytics/Insights
• Provider APIs
o Facebook Insights API
• /{page-id}/insights
• /{post-id}/insights
o Twitter Analytics
• Analytics.twitter.com
o Impressions, engagement rate
o Interests, locations etc.
• Thirdparty Providers –
o Gnip , Datasift
o Topsy Labs