<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Perform Sentimental Analysis Using Base +advanced Sas. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306594#M65579</link>
    <description>&lt;P&gt;A data step is all you need.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Create a format for lookup table&lt;/P&gt;
&lt;P&gt;2. Break a sentence into words. Since these are tweets you have a limit of words so splitting into an array should be easy enough. CountW will tell you how many words.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3a. Loop through each word for 1 gram, apply format and if found output score.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3b. Loop through again for 2 gram, apply format and if found output score&lt;/P&gt;
&lt;P&gt;3c. 3a/3b for 3 gram.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 22 Oct 2016 23:26:20 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-10-22T23:26:20Z</dc:date>
    <item>
      <title>Perform Sentiment Analysis Using Base +advanced Sas.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306572#M65564</link>
      <description>&lt;P&gt;I have to analyize a tweet for example :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is not good at all.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;we have a table which includes words with there polarity values.&lt;/P&gt;
&lt;P&gt;eg&amp;nbsp;&lt;BR /&gt;Word &amp;nbsp; &amp;nbsp; polarity&amp;nbsp;&lt;/P&gt;
&lt;P&gt;good &amp;nbsp; &amp;nbsp; &amp;nbsp; +3&lt;/P&gt;
&lt;P&gt;not good &amp;nbsp;-3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When i pass this through code i should get a polarity of tweet as -3 and not +3.&lt;/P&gt;
&lt;P&gt;"good" has a positive polarity but since a "not" comes before it the whole &amp;nbsp;meaning changes.&lt;/P&gt;
&lt;P&gt;Help me out with this one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Oct 2016 22:44:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306572#M65564</guid>
      <dc:creator>wizkid2050</dc:creator>
      <dc:date>2016-10-22T22:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: Perform Sentimental Analysis Using Base +advanced Sas.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306576#M65566</link>
      <description>&lt;P&gt;What's the ngram of your look up table?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Oct 2016 22:02:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306576#M65566</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-10-22T22:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: Perform Sentimental Analysis Using Base +advanced Sas.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306577#M65567</link>
      <description>&lt;P&gt;I am not clear with what exactly ngram refers to.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Oct 2016 22:09:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306577#M65567</guid>
      <dc:creator>wizkid2050</dc:creator>
      <dc:date>2016-10-22T22:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: Perform Sentimental Analysis Using Base +advanced Sas.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306581#M65568</link>
      <description>&lt;P&gt;# of words per phrase&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;good - 1-gram&lt;/P&gt;
&lt;P&gt;not good 2-gram&lt;/P&gt;
&lt;P&gt;really not good 3-gram&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the max ngram of your lookup table?&lt;/P&gt;</description>
      <pubDate>Sat, 22 Oct 2016 22:44:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306581#M65568</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-10-22T22:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Perform Sentimental Analysis Using Base +advanced Sas.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306582#M65569</link>
      <description>&lt;P&gt;Also, what's 'Advanced SAS'? Do you have EM with text analytics?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Oct 2016 22:45:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306582#M65569</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-10-22T22:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: Perform Sentimental Analysis Using Base +advanced Sas.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306586#M65572</link>
      <description>&lt;P&gt;Advanced SAS using proc sql or macros. and No i don't have em with text analytics.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Oct 2016 22:48:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306586#M65572</guid>
      <dc:creator>wizkid2050</dc:creator>
      <dc:date>2016-10-22T22:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: Perform Sentimental Analysis Using Base +advanced Sas.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306587#M65573</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;# of words per phrase&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;good - 1-gram&lt;/P&gt;
&lt;P&gt;not good 2-gram&lt;/P&gt;
&lt;P&gt;really not good 3-gram&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the max ngram of your lookup table?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Oct 2016 22:59:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306587#M65573</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-10-22T22:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: Perform Sentimental Analysis Using Base +advanced Sas.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306590#M65575</link>
      <description>&lt;P&gt;3&lt;/P&gt;</description>
      <pubDate>Sat, 22 Oct 2016 23:08:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306590#M65575</guid>
      <dc:creator>wizkid2050</dc:creator>
      <dc:date>2016-10-22T23:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: Perform Sentimental Analysis Using Base +advanced Sas.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306594#M65579</link>
      <description>&lt;P&gt;A data step is all you need.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Create a format for lookup table&lt;/P&gt;
&lt;P&gt;2. Break a sentence into words. Since these are tweets you have a limit of words so splitting into an array should be easy enough. CountW will tell you how many words.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3a. Loop through each word for 1 gram, apply format and if found output score.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3b. Loop through again for 2 gram, apply format and if found output score&lt;/P&gt;
&lt;P&gt;3c. 3a/3b for 3 gram.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Oct 2016 23:26:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306594#M65579</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-10-22T23:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: Perform Sentimental Analysis Using Base +advanced Sas.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306595#M65580</link>
      <description>&lt;P&gt;ya i was able to get to the part of splitting words. bt i still didnt get how to apply the n gram logic.&amp;nbsp;&lt;BR /&gt;It would be great if you can help me with a sample code for above example.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Oct 2016 23:32:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306595#M65580</guid>
      <dc:creator>wizkid2050</dc:creator>
      <dc:date>2016-10-22T23:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: Perform Sentimental Analysis Using Base +advanced Sas.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306597#M65581</link>
      <description>&lt;P&gt;Sample data?&lt;/P&gt;</description>
      <pubDate>Sat, 22 Oct 2016 23:56:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306597#M65581</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-10-22T23:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: Perform Sentimental Analysis Using Base +advanced Sas.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306598#M65582</link>
      <description>&lt;P&gt;The question and code here are relevant, but the techniques may be beyond your programming skills. I'm a proponent of understanding your code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Base-SAS-Programming/Big-Data-Cartesian/m-p/288303/highlight/true#M59418" target="_blank"&gt;https://communities.sas.com/t5/Base-SAS-Programming/Big-Data-Cartesian/m-p/288303/highlight/true#M59418&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Oct 2016 00:18:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306598#M65582</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-10-23T00:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: Perform Sentimental Analysis Using Base +advanced Sas.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306599#M65583</link>
      <description>&lt;P&gt;Here one is attached file containing 5 tweets and the other file has around 2400 words with their polarity scores.&lt;/P&gt;</description>
      <pubDate>Sun, 23 Oct 2016 00:43:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306599#M65583</guid>
      <dc:creator>wizkid2050</dc:creator>
      <dc:date>2016-10-23T00:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: Perform Sentimental Analysis Using Base +advanced Sas.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306602#M65584</link>
      <description>&lt;P&gt;I'm not downloading a zip file. Most won't either.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Add as plain text into your post, ideally as a data step&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Oct 2016 01:16:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306602#M65584</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-10-23T01:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Perform Sentiment Analysis Using Base +advanced Sas.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306626#M65596</link>
      <description>&lt;P&gt;Does your polarity table contains priority of checking words ?&lt;/P&gt;
&lt;P&gt;Which columns do you have in this polarity table ? Can you add columns to it ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using a simple data step with indexw() function can do the work,&lt;/P&gt;
&lt;P&gt;here, without using a polarity table, but just coding your example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data _NULL_;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;text = '&lt;SPAN&gt;This is not good at all. ';&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if indexw(text, 'not good') &amp;gt; 0 then polarity=-3; else &amp;nbsp;/* priority 1 */&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if indexw(text,'good') &amp;gt; 0 then polarity = 3; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;/* priority 2&amp;nbsp;*/&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;put polarity=;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Oct 2016 10:01:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perform-Sentiment-Analysis-Using-Base-advanced-Sas/m-p/306626#M65596</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-10-23T10:01:32Z</dc:date>
    </item>
  </channel>
</rss>

