<?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: Text Search in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Text-Search/m-p/333114#M75022</link>
    <description>&lt;P&gt;if there are phrases or compund words like "End of period" or "Introductory APR"?&lt;/P&gt;&lt;P&gt;these words will be passed as indvidual words and not as part of the string that I'm insterested in.&lt;/P&gt;</description>
    <pubDate>Wed, 15 Feb 2017 19:02:37 GMT</pubDate>
    <dc:creator>SASPhile</dc:creator>
    <dc:date>2017-02-15T19:02:37Z</dc:date>
    <item>
      <title>Text Search</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Text-Search/m-p/331243#M74417</link>
      <description>&lt;P&gt;There is a credit hist coulmn that gives information of customer. I want to look at records whose credit is based based on some key terms like&amp;nbsp;&lt;/P&gt;&lt;P&gt;poor,bad,low,&lt;STRONG&gt; delinquent and in various forms. a like operator doesnt serve the purpose as sometimes the words can be shortned by the representative. can this be done in regex, so as i look through the cases i can add the new words in search?&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2017 17:07:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Text-Search/m-p/331243#M74417</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2017-02-09T17:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: Text Search</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Text-Search/m-p/331260#M74428</link>
      <description>Hi:&lt;BR /&gt;  This sounds like the kind of thing that Enterprise Miner and Text Miner can do. What have you tried? What tools do you have? &lt;BR /&gt; &lt;BR /&gt;cynthia</description>
      <pubDate>Thu, 09 Feb 2017 17:50:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Text-Search/m-p/331260#M74428</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-02-09T17:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: Text Search</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Text-Search/m-p/331262#M74429</link>
      <description>&lt;P&gt;Base SAS&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2017 17:55:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Text-Search/m-p/331262#M74429</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2017-02-09T17:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: Text Search</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Text-Search/m-p/331273#M74434</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data terms;
input term : $8. @@;
cards;
poor bad low negative neg lw
;
run;
%let terms=&amp;amp;sysnobs;
%put &amp;amp;=terms;

proc transpose data=terms out=terms_array(drop=_name_) prefix=term;
var term;
run;

data have;
str='Lady shows poor judgement.  Has good credit.';
output;
str='Good Credit';
output;
str='This guy has terrible credit!';
output;
str='Poor credit';
output;
run;

data want;
set terms_array;
array term[&amp;amp;terms];
drop term:;

do until (done);
  set have end=done;
  do _n_=1 to countw(str);
    flag=(whichc(lowcase(scan(str,_n_)),of term[*])&amp;gt;0);
	if flag&amp;gt;0 then leave;
  end;
  output;
end;
stop;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Feb 2017 18:31:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Text-Search/m-p/331273#M74434</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2017-02-09T18:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: Text Search</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Text-Search/m-p/331295#M74440</link>
      <description>&lt;P&gt;I might be over&amp;nbsp;oversimplifying. But if you could look at the data and see if they all start with a disticnt letter&amp;nbsp;that we could be associated with a status we can format it and achieve what you look for. But as I speak this I have no idea of your data.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test ;
input id status $ ;
datalines ;
12 Poor
13 bad
15 Del
16 bd
19 lw
;
run ;

proc sql ;
select id, 
case 
  when upcase(substr(status,1,1)) = 'P' then 'POOR'
  when upcase(substr(status,1,1)) = 'B' then 'BAD'
  when upcase(substr(status,1,1)) = 'G' then 'GOOD'
  when upcase(substr(status,1,1)) = 'D' then 'DELINQUENT'
  when upcase(substr(status,1,1)) = 'L' then 'LOW'
  else 'OTHER'
end as status1 
from test ;
quit ;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2017 19:19:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Text-Search/m-p/331295#M74440</guid>
      <dc:creator>anoopmohandas7</dc:creator>
      <dc:date>2017-02-09T19:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: Text Search</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Text-Search/m-p/332644#M74892</link>
      <description>&lt;P&gt;it is not a simple search with one word values in it. It is a text column with 5000 plus characters and need to identify if any of the expected words are present in the text.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 15:19:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Text-Search/m-p/332644#M74892</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2017-02-14T15:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: Text Search</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Text-Search/m-p/333114#M75022</link>
      <description>&lt;P&gt;if there are phrases or compund words like "End of period" or "Introductory APR"?&lt;/P&gt;&lt;P&gt;these words will be passed as indvidual words and not as part of the string that I'm insterested in.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 19:02:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Text-Search/m-p/333114#M75022</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2017-02-15T19:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: Text Search</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Text-Search/m-p/333199#M75039</link>
      <description>&lt;P&gt;May be something like below could do the job for you.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data search_terms;
  infile datalines truncover;
  input search_term $100.;
  search_term=lowcase(search_term);
  datalines;
End of period
Introductory APR
Good
Poor
;
run;

data have;
  infile datalines truncover;
  input sentence $200.;
  datalines;
Lady shows poor judgement.  Has good credit.
Good Credit
This guy has terrible credit!
Poor credit
blah end of period blah
;
run;

data want;
  set have end=last;
  do _i=1 to nobs;
    set search_terms nobs=nobs point=_i;
    if find(sentence,strip(search_term),'it') then leave;
    call missing(search_term);
  end;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Feb 2017 22:25:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Text-Search/m-p/333199#M75039</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2017-02-15T22:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: Text Search</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Text-Search/m-p/333223#M75050</link>
      <description>Perhaps sum the weights created when a specific phrase is found in the long text. &lt;BR /&gt;It could separate searches &lt;BR /&gt;- looking for indications of "good" &lt;BR /&gt;- looking for indications of "poor"&lt;BR /&gt;Might make a significant cpu impact</description>
      <pubDate>Wed, 15 Feb 2017 23:27:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Text-Search/m-p/333223#M75050</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2017-02-15T23:27:04Z</dc:date>
    </item>
  </channel>
</rss>

