3 ms·
I don't think so. In my experience, people here are just as critical to Apple as other companies.
by dgzl 7y ago
I don't think so. In my experience, people here are just as critical to Apple as other companies.
- saagarjha 7y agoFrom some very crude statistical sentiment analysis, they're somewhat more critical of Apple.
- big_chungus 7y agoLink to said analysis?
- saagarjha 7y agoI wrote a script for this a while back to analyze them with nltk: #!/usr/bin/env python3 import nltk import nltk.sentiment.vader import json import urllib.request companies = [ "apple", "google", "microsoft", "amazon", "facebook", ] sample_size = 10 def get_json(url): request = urllib.request.Request(url) request.add_header("User-Agent", "Python") return json.load(urllib.request.urlopen(request)) def allcomments(json): comment = json["text"] comments = comment if comment else "" for child in json["children"]: comments += allcomments(child) return comments if __name__ == "__main__": for company in companies: sentiments = [] print(company) for item in get_json("https://hn.algolia.com/api/v1/search?query=" + company + "&tags=story")["hits"][:sample_size]: tokens = nltk.tokenize.sent_tokenize(allcomments(get_json("https://hn.algolia.com/api/v1/items/" + item["objectID"]))) sia = nltk.sentiment.vader.SentimentIntensityAnalyzer() scores = sum([sia.polarity_scores(token)["compound"] for token in tokens]) sentiment = scores / len(tokens) print("\t" + item["title"] + ": " + str(sentiment)) sentiments.append(sentiment) print("Average: " + str(sum(sentiments) / len(sentiments))) Apple gets low scores because of China, mainly. Plus they lack the many open source projects that buoy up companies like Microsoft.
- dgzl 7y agoImpressive