The LITI rule for Text Analytics that you didn’t know you needed…until now!
Recent Library Articles
Recently in the SAS Community Library: Customer complaint call transcripts can end up being quite verbose. SAS' @PeterChristie reveals how to distill relevant info using SAS Text Analytics.
Hi, I'm fighting with a translate() function in my new job. I have my 'old faithful' code fragment to remove diacritics (accented characters) which worked fine (both: in datastep and proc sql) -till current job: TRANSLATE(FirstNAME, "aaccdeeillnnoorrsstuyzz", "áäčćďéěíĺľňńóôŕřšśťúýžź") + I tried to replace " with apostrophs >>> no! + I tried to change obly one character (e.g. á to a) - it worked well + but when I extend <StringFROM> and <StringTO> to very small set of characters (fom 'áíšžň' to 'aiszn') >> translate() started to mix the characters: .. + Adamík =>>> Adami k ... error: add space after correct change + Arpáš =>>> Arpi � ... change á to i instead of a + strange char inst. "s" + Badáň =>>> Badi ň ... same "a" + ignore ň from list + Ažimov =>>> Ažimov ... ignore ž Bonus: I have another 'shape' to remove strange chars from a name and it seems works 😄 ... (all are changed to a space which is further celaning by COMPBL() 😞 COMPBL(translate(FirstNAME, " ", "0123456789/\:;|{}[]()!@#$%^&*_.,-")) as MyLoveNAME, Have somebody an idea where is it screwed? PS: I hacked it by this ugly patch ... tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd( lowcase(cli.FirstNAME), 'á', 'a'), 'ä', 'a'), 'č', 'c'), 'ď', 'd'), 'é', 'e'), 'ě', 'e'), 'í', 'i'), 'ĺ', 'l'), 'ľ', 'l'), 'ň', 'n'), 'ó', 'o'), 'ô', 'o'), 'ŕ', 'r'), 'ř', 'r'), 'š', 's'), 'ť', 't'), 'ú', 'u'), 'ý', 'y'), 'ž', 'z') as NameNoDIA, ...but it makes me sick 😞 and -truly: i'm surprising it works. -thx- Martin
... View more
We are using SAS94M8 on Linux Grid platform. As part of a project we would need to connect to Teradata Vantage on GCP. Part of this migration will change the way clients use to connect to Teradata from LDAP to SAML based federated authentication approach. Can this feature of SAML based federated authentication be enabled or released for SAS94M8? Documentation for configuring federated authentication on Teradata. Configuration for Browser Authentication • Security Administration • Reader • Teradata Online Documentation | Quick access to technical manuals End users would only need to provide the DSN name and the logmech (BROWSER or EXTERNALBROWSER) to connect to the database. Teradata support the BROWSER mechanism on Windows and Mac OS only.
... View more
Suppose, because I would like to create some visual separation between groups of columns in PROC REPORT output, I want a column that is shaded gray and has no data in it. I can get most of the way there via this program. Note the use of the fake variable GAP in the columns statement, which produces the empty column F in the Excel output. But you can see the gray appears for the DATA rows but not for the header rows. In PROC REPORT, I use style(header) but it doesn't produce the desired results. So how can I get PROC REPORT to shade the first two rows of column F the same color gray?
proc format;
value gapf .,low-high=' ';
run;
ods excel file="test.xlsx";
proc report data=sashelp.cars(obs=50);
columns make msrp,type gap invoice,type;
define make/group "Make";
define type/across " ";
define gap/' ' format=gapf. style(column)={cellwidth=.01in backgroundcolor=verylightgray}
style(header)={backgroundcolor=verylightgray};
define msrp/mean "MSRP";
define invoice/mean "Invoice";
run;
ods excel close;
Also, how can I make column F narrower, the option cellwidth=.01in doesn't seem to make it that narrow? Is this too narrow in Excel?
... View more
Hi everyone! I'm currently learning SAS programming, and I wanted to embark on my own project for now. I have access to SAS Viya, so I was thinking of conducting unsupervised classification of emails (multi-class classification) through VDMML and VTA. I was thinking of running the text through VTA and then extracting the score code from the categories node, and then process this data to use in VDMML to train a classification model. However, I'm not sure what kind of pipeline would be suitable for this approach as most of the current pipelines seem catered towards supervised learning. Any help in this area would be appreciated. Apologies if this is a very basic question, and thank
... View more
How can I fix this code? _LABEL_ can't be found. And the results Pctls_trp_trp, imo dosen't look very nice. with _NAME_ and col1-col14. Can someone help me with the _LABEL_ ? proc univariate data=sashelp.shoes noprint;
var Sales Inventory Returns;
output out=Pctls pctlpts = 5 10 20 25 30 40 50 60 75 80 90 95
pctlpre = Sales_ Inventory_ Returns_
pctlname = pctl5 pctl10 pctl20 pctl25 pctl30 pctl40
pctl50 pctl60 pctl75 pctl80 pctl90 pctl95
mean=Sales_mean Inventory_mean Returns_mean
std =Sales_std Inventory_std Returns_std ;
run;
PROC TRANSPOSE data=Pctls out=Pctls_trp;
run;
data Pctls_trp;
set Pctls_trp;
_NAME_=scan(_NAME_,1,'_');
run;
proc sort data=Pctls_trp;
by _NAME_;
run;
proc transpose data=Pctls_trp out=Pctls_trp_trp;
by _NAME_;
id _LABEL_;
var col1;
run;
/* end of program */
... View more