<?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: Processing emoticons in textual data? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Processing-emoticons-in-textual-data/m-p/114356#M23561</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad to hear that you got what you needed, but I'd still be interested to hear if someone has an easier solution for dealing with imbedded gif emoticons.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Nov 2012 01:45:25 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2012-11-09T01:45:25Z</dc:date>
    <item>
      <title>Processing emoticons in textual data?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Processing-emoticons-in-textual-data/m-p/114350#M23555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working with data that contains comments from American college students.&amp;nbsp; There are a large number of emoticons in these comments, which I initially removed ( &lt;STRONG&gt;comment1=compress(comment,,'p');&lt;/STRONG&gt; ).&amp;nbsp; The problem is that this appears to lead to a reasonably large loss of information.&amp;nbsp; Does anyone have any code that changes emoticons to words?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chad Atkinson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 13:59:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Processing-emoticons-in-textual-data/m-p/114350#M23555</guid>
      <dc:creator>ChadAtkinson</dc:creator>
      <dc:date>2012-11-01T13:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: Processing emoticons in textual data?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Processing-emoticons-in-textual-data/m-p/114351#M23556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The list shown here might give you a start: &lt;A href="http://en.wikipedia.org/wiki/List_of_emoticons" title="http://en.wikipedia.org/wiki/List_of_emoticons"&gt;List of emoticons - Wikipedia, the free encyclopedia&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 14:08:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Processing-emoticons-in-textual-data/m-p/114351#M23556</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-11-01T14:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: Processing emoticons in textual data?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Processing-emoticons-in-textual-data/m-p/114352#M23557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have been looking at the tranwrd function as a starting point for this.&amp;nbsp; The longer term goal is to generate a macro that has a set of translations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*input test data*/&lt;/P&gt;&lt;P&gt;data comments;&lt;/P&gt;&lt;P&gt;input f1 &amp;amp; $1000.;&lt;/P&gt;&lt;P&gt;datalines4;&lt;/P&gt;&lt;P&gt;We went through everything very quickly and I feel like I'm ready to make changes to my paper. &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt; /*there is a blank, colon, right parens here but it gets converted by the bbs*/&lt;/P&gt;&lt;P&gt;Thank you so much B*****&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;she was wonderful, i has been here since 2:00P.M and it is now 7:10. Wow, please pray for me Ms. R*****&lt;/P&gt;&lt;P&gt;Friendly &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;;;;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*use tranwrd to replace emoticon strings with words*/&lt;/P&gt;&lt;P&gt;data comments_test;&lt;/P&gt;&lt;P&gt;set comments;&lt;/P&gt;&lt;P&gt;length em_comment $ 1000;&lt;/P&gt;&lt;P&gt;em_comment=f1;&lt;/P&gt;&lt;P&gt;em_comment=tranwrd(f1,":)", " smile");&lt;/P&gt;&lt;P&gt;em_comment=tranwrd(f1,"=)", " smile");&lt;/P&gt;&lt;P&gt;em_comment=tranwrd(f1,";)", " smile");&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue that I have is that when I run the code, only the fifth record is changed (semicolon, right parenthesis becomes 'smile').&amp;nbsp; The others are not altered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2012 15:36:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Processing-emoticons-in-textual-data/m-p/114352#M23557</guid>
      <dc:creator>ChadAtkinson</dc:creator>
      <dc:date>2012-11-08T15:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: Processing emoticons in textual data?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Processing-emoticons-in-textual-data/m-p/114353#M23558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;em_comment=tranwrd(em_comment,":)", " smile"); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;em_comment=tranwrd(em_comment,"=)", " smile"); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;em_comment=tranwrd(em_comment,";)", " smile");&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2012 17:03:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Processing-emoticons-in-textual-data/m-p/114353#M23558</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2012-11-08T17:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: Processing emoticons in textual data?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Processing-emoticons-in-textual-data/m-p/114354#M23559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree with &lt;A __default_attr="260198" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; that you have to write your statements such that they don't conflict with each other, but I think the problem you are running into goes well beyond that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The emoticons you are trying to capture are gifs .. not text, thus they don't copy and paste when you try to bring them into your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully someone comes up with a better solution but, at least, the following would work.&amp;nbsp; In editing your post, using the forum's advanced editor feature, I was able to convert the post to its html format.&amp;nbsp; The results are shown in the following datastep.&amp;nbsp; The lines will probably wrap, unfortunately:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*input test data*/&lt;/P&gt;&lt;P&gt;data comments;&lt;/P&gt;&lt;P&gt;input @'sans-serif;"&amp;gt;' f1 &amp;amp; $1000.;&lt;/P&gt;&lt;P&gt;datalines4;&lt;/P&gt;&lt;P&gt;&amp;lt;body&amp;gt;&amp;lt;p style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&amp;gt;&amp;lt;span style="font-family: arial, helvetica, sans-serif;"&amp;gt;We went through everything very quickly and I feel like I'm ready to make changes to my paper. &amp;lt;img class="jive_macro jive_emote" src="/5.0.2/images/emoticons/happy.gif" jivemacro="emoticon" ___jive_emoticon_name="happy" /&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;p style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&amp;gt;&amp;lt;span style="font-family: arial, helvetica, sans-serif;"&amp;gt;Thank you so much B*****&amp;lt;img class="jive_macro jive_emote" src="/5.0.2/images/emoticons/happy.gif" jivemacro="emoticon" ___jive_emoticon_name="happy" /&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;p style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&amp;gt;&amp;lt;span style="font-family: arial, helvetica, sans-serif;"&amp;gt;she was wonderful, i has been here since 2:00P.M and it is now 7:10. Wow, please pray for me Ms. R*****&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;p style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&amp;gt;&amp;lt;span style="font-family: arial, helvetica, sans-serif;"&amp;gt;Friendly =)&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;p style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&amp;gt;&amp;lt;span style="font-family: arial, helvetica, sans-serif;"&amp;gt;&amp;lt;img class="jive_macro jive_emote" src="/5.0.2/images/emoticons/happy.gif" jivemacro="emoticon" ___jive_emoticon_name="happy" /&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/body&amp;gt;&lt;/P&gt;&lt;P&gt;;;;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data comments_test;&lt;/P&gt;&lt;P&gt;set comments;&lt;/P&gt;&lt;P&gt;length em_comment $ 1000;&lt;/P&gt;&lt;P&gt;em_comment=TRANWRD(F1,"&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;","");&lt;/P&gt;&lt;P&gt;em_comment=TRANWRD(em_comment,"&amp;lt;/body&amp;gt;","");&lt;/P&gt;&lt;P&gt;em_comment=tranwrd(em_comment,":)", " smile");&lt;/P&gt;&lt;P&gt;em_comment=tranwrd(em_comment,"=)", " smile");&lt;/P&gt;&lt;P&gt;em_comment=tranwrd(em_comment,";)", " smile");&lt;/P&gt;&lt;P&gt;em_comment=tranwrd(em_comment,'&amp;lt;img class="jive_macro jive_emote" src="/5.0.2/images/emoticons/happy.gif" jivemacro="emoticon" ___jive_emoticon_name="happy" /&amp;gt;', " smile");&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2012 17:46:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Processing-emoticons-in-textual-data/m-p/114354#M23559</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-11-08T17:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: Processing emoticons in textual data?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Processing-emoticons-in-textual-data/m-p/114355#M23560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the comments. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I should clarify that I am only concerned with processing text with this project.&amp;nbsp; (The SAS board is where the gifs are being produced.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks to Edward Ballard's comment, I was able to obtain a solution to the problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt;emoticon: a macro to replace common emoticons with text.&amp;nbsp; It is designed to process text comments &lt;/P&gt;&lt;P&gt;prior to text/sentiment analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To call the macro:&lt;/P&gt;&lt;P&gt;%emoticon(comment=name_of_variable_containing_comments, set= name_of_dataset_containing_comments);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro emoticon (comment=, set=);&lt;/P&gt;&lt;P&gt;data work.transformed_&amp;amp;set.;&lt;/P&gt;&lt;P&gt;set &amp;amp;set;&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"&amp;gt;:]"," smile");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"(-:"," smile");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":-)"," smile");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":)"," smile");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":o)"," smile");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":]"," smile");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":3"," smile");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":c)"," smile");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":&amp;gt;"," smile");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"=]"," smile");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"8)"," smile");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"=)"," smile");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":}"," smile");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":^)"," smile");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":-)="," smile");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"#:-)"," smile");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":-)8"," smile");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"d:-)"," smile");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"&amp;amp;:-)"," smile");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"8-)"," smile");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"{:-)"," smile");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"(:-)"," smile");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":-( )"," smile");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"C|:-)"," smile");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"[:-)"," smile");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"&amp;gt;:D"," laugh");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":-D"," laugh");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":D"," laugh");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"8-D"," laugh");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"8D"," laugh");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"x-D"," laugh");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"xD"," laugh");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"X-D"," laugh");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"XD"," laugh");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"=-D"," laugh");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"=D"," laugh");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"=-3"," laugh");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"=3"," laugh");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"B^D"," laugh");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":-))"," happy");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"&amp;gt;:["," sad");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":-("," sad");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":("," sad");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":-c"," sad");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":c"," sad");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":-&amp;lt;"," sad");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":&amp;lt;"," sad");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":-["," sad");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":["," sad");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":{"," sad");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":-||"," angry");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":@"," angry");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"&amp;gt;:-("," angry");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"QQ"," crying");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"D:&amp;lt;"," disgust or sadness");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"D:"," disgust or sadness");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"D8"," disgust or sadness");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"D;"," disgust or sadness");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"D="," disgust or sadness");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"DX"," disgust or sadness");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"v.v"," disgust or sadness");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"D-':"," disgust or sadness");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"&amp;gt;:o"," surprise");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"&amp;gt;:O"," surprise");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":-O"," surprise");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":O"," surprise");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"°o°"," surprise");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"°O°"," surprise");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":O"," surprise");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"o_O"," surprise");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"o_0"," surprise");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"o.O"," surprise");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"8-0"," surprise");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":-&amp;lt;&amp;gt;"," surprise");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":*"," kiss");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":^*"," kiss");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"&amp;gt;;]"," wink");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,";-)"," wink");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,";)"," wink");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"*-)"," wink");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"*)"," wink");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,";-]"," wink");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,";]"," wink");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,";D"," wink");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,";^)"," wink");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":-,"," wink");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"&amp;gt;:P"," playfully sticking out tongue");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":-P"," playfully sticking out tongue");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":P"," playfully sticking out tongue");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"X-P"," playfully sticking out tongue");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"x-p"," playfully sticking out tongue");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.," xp "," playfully sticking out tongue");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.," XP "," playfully sticking out tongue");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":-p"," playfully sticking out tongue");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":p"," playfully sticking out tongue");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"=p"," playfully sticking out tongue");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":-b"," playfully sticking out tongue");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":b"," playfully sticking out tongue");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"&amp;gt;:\"," annoyed");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"&amp;gt;:/"," annoyed");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":-\"," annoyed");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":-/"," annoyed");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":-."," annoyed");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":/"," annoyed");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":\"," annoyed");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"=/"," annoyed");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"=\"," annoyed");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":S"," annoyed");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"&amp;gt;.&amp;lt;"," annoyed");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":-|"," determined or straight face");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":$"," embarrassed");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"&amp;gt;:X"," not speaking");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":-X"," not speaking");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":X"," not speaking");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"O:-)"," angel or innocent");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"0:-3"," angel or innocent");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"0:3"," angel or innocent");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"0:-)"," angel or innocent");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"0:)"," angel or innocent");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"0;^)"," angel or innocent");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"&amp;gt;:)"," evil");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"&amp;gt;;)"," evil");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"&amp;gt;:-)"," evil");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"}:-)"," devilish");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"}:)"," devilish");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"3:-)"," devilish");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"3:)"," devilish");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"o/\o"," high five");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"^5"," high five");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"|-O"," bored");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":-&amp;amp;"," tongue-tied");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":&amp;amp;"," tongue-tied");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"#-)"," confused");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"%-)"," confused");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"%)"," confused");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":-###.."," sick");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":###.."," sick");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"&amp;lt;:-|"," dunce");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"&amp;lt;*)))-{"," fish");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"&amp;gt;&amp;lt;(((*&amp;gt;"," fish");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"&amp;gt;&amp;lt;&amp;gt; "," fish");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"*\0/*"," cheerleader");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"@}-;-'---"," rose");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"@&amp;gt;--&amp;gt;--"," rose");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"&amp;lt;3"," heart");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"&amp;lt;/3"," broken heart");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":-o zz"," bored");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,": @"," shouting");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":-(0)"," shouting");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"(-.-)"," sleeping");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"|-I"," sleeping");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,"|-O"," snoring");&lt;/P&gt;&lt;P&gt;&amp;amp;comment.=tranwrd(&amp;amp;comment.,":-v"," talking");&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%mend emoticon;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also received some local assistance that used perl:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: none repeat scroll 0% 0% white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt; comments_test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt; comments;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;em_comment=f1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;x&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;=compress(compress(em_comment,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: none repeat scroll 0% 0% white;"&gt;''&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: none repeat scroll 0% 0% white;"&gt;'kp'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: none repeat scroll 0% 0% white;"&gt;' '&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;y=prxparse(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: none repeat scroll 0% 0% white;"&gt;'s/[:;=]-?[D)]/Smile/'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: none repeat scroll 0% 0% white;"&gt;call&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt; prxchange(y,-&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: none repeat scroll 0% 0% white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;,x);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: none repeat scroll 0% 0% white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;The issue in that case was &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;A) I am a novice SAS programmer and a neophyte perl coder &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;B) how to handle emoticons of different lengths (i.e. when the first buffer can be 1 to n characters and the second one can be 1 to n as well...)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;Thanks again for the assistance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% white;"&gt;Chad&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2012 18:04:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Processing-emoticons-in-textual-data/m-p/114355#M23560</guid>
      <dc:creator>ChadAtkinson</dc:creator>
      <dc:date>2012-11-08T18:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: Processing emoticons in textual data?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Processing-emoticons-in-textual-data/m-p/114356#M23561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad to hear that you got what you needed, but I'd still be interested to hear if someone has an easier solution for dealing with imbedded gif emoticons.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2012 01:45:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Processing-emoticons-in-textual-data/m-p/114356#M23561</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-11-09T01:45:25Z</dc:date>
    </item>
  </channel>
</rss>

