R में Sentiment Analysis
Ted Kwartler
Data Dude
library(qdap)
library(magrittr)
text_df %$% polarity(text)
एक "polarity" ऑब्जेक्ट लौटाता है जिसमें positive और negative स्कोर होते हैं.
Subjectivity lexicon एक प्री-डिफ़ाइंड शब्द-सूची है जो positive/negative जैसे भाव-संदर्भ या "frustration" और "joy" जैसी खास भावनाओं से जुड़ी होती है.
qdap का polarity() फंक्शन hash_sentiment_huliu {{1}} के lexicon का उपयोग करता है
tidytext में sentiments tibble है, जिसमें
| Name | Description |
|---|---|
dodds_sentiment |
Mechanical Turk Sentiment Words |
hash_emoticons |
बेसिक पंक्चुएशन इमोटिकॉन्स :) के अनुवाद |
hash_sentiment_huliu |
U of IL @CHI Polarity (+/-) शब्द अनुसंधान |
hash_sentiment_jockers |
library(syuzhet) से लिया गया lexicon |
hash_sentiment_nrc |
5468 शब्द, -1 और 1 के बीच क्राउडसोर्स्ड स्कोरिंग |

| Rank | City | 2010 Census Population | Actual % | Zipf's Expected % |
|---|---|---|---|---|
| 1 | New York | 8,175,133 | 100% | ... |
| 2 | LA | 3,792,621 | 46% | 50% |
| 3 | Chicago | 2,695,598 | 33% | 33% |
| 4 | Houston | 2,100,263 | 26% | 25% |
| 5 | Philadelphia | 1,526,006 | 19% | 20% |
यदि एक ही लक्ष्य तक पहुँचने के कई तरीके हों, तो लोग सबसे कम मेहनत वाला तरीका चुनेंगे



R में Sentiment Analysis