Sample 49407: How to create a CSV file by using a folder of scored XML documents from SAS® Sentiment Analysis Studio
Overview
In SAS Sentiment Analysis Studio, there is no functionality that enables you to save a scored testing-file as a comma-delimited (CSV) file. The attached program takes the exported folder of scored XML documents and creates a CSV file that contains the filename, sentiment, probability, and confidence. The program needs to be run in Base SAS® software, and requires installation of the XML Mapper below. Attached is a sample XML polarity map (DocSentiment.map) that can be used with this program.
Select the Downloads tab in this note to access the program "Scored XML Documents into a CSV file" and sample.
Additional Documentation
You need to modify two lines in the sample program. Specify the locations of the polarity map, and of the test folder.
The polarity map is specified in this line of code:
filename SXLEMAP 'C:\temp\docSentiment.map';
The test folder is specified in this line of code:
%xmlToDst(c:\test);
Installation information for SAS XML Mapper can be found at the following URL:
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
How to create a CSV file by using a folder of scored XML documents from SAS® Sentiment Analysis Studio
Type: | Sample |
Topic: | Analytics ==> Text Mining
|
Date Modified: | 2013-03-22 13:18:24 |
Date Created: | 2013-03-12 14:00:06 |
Operating System and Release Information
Teragram | SAS Sentiment Analysis Studio | Microsoft® Windows® for x64 | 12.1 | | | |
Microsoft Windows 8 Pro | 12.1 | | | |
Microsoft Windows Server 2008 | 12.1 | | | |
Microsoft Windows Server 2008 for x64 | 12.1 | | | |
Microsoft Windows Server 2012 | 12.1 | | | |
Microsoft Windows XP Professional | 12.1 | | | |
Windows 7 Enterprise 32 bit | 12.1 | | | |
Windows 7 Enterprise x64 | 12.1 | | | |
Windows 7 Home Premium 32 bit | 12.1 | | | |
Windows 7 Home Premium x64 | 12.1 | | | |
Windows 7 Professional 32 bit | 12.1 | | | |
Windows 7 Professional x64 | 12.1 | | | |
Windows 7 Ultimate 32 bit | 12.1 | | | |
Windows 7 Ultimate x64 | 12.1 | | | |