textRuleDevelop

exportTextModel

Description

The exportTextModel action builds an analytic store (astore) model from a category, concept, or sentiment model table. This action allows you to export linguistic models developed in SAS Visual Text Analytics into a portable format (astore) that can be used for scoring documents in various environments, including SAS Micro Analytic Service and CAS. It supports creating specific astore models for categories, concepts, and sentiment analysis with configurable options for document types and output modes.

textRuleDevelop.exportTextModel <result=results> <status=rc> / *build={modelType="CATEGORY" | "CONCEPT" | "SENTIMENT", modelType-specific-parameters}, *casOut={casouttable}, fixedCharLength=integer, language="ARABIC" | "CHINESE" | "CROATIAN" | "CZECH" | "DANISH" | "DUTCH" | "ENGLISH" | "FARSI" | "FINNISH" | "FRENCH" | "GERMAN" | "GREEK" | "HEBREW" | "HINDI" | "HUNGARIAN" | "INDONESIAN" | "ITALIAN" | "JAPANESE" | "KAZAKH" | "KOREAN" | "NORWEGIAN" | "POLISH" | "PORTUGUESE" | "ROMANIAN" | "RUSSIAN" | "SLOVAK" | "SLOVENE" | "SPANISH" | "SWEDISH" | "TAGALOG" | "THAI" | "TURKISH" | "VIETNAMESE", *table={castable}, text="string";
Settings
ParameterDescription
buildSpecifies the model type (CATEGORY, CONCEPT, or SENTIMENT) and its specific parameters, such as 'docType' or 'outputTableMode'.
casOutSpecifies the output table that will contain the generated analytic store (astore) model.
tableSpecifies the input table that contains the compiled category, concept, or sentiment model to be exported.
fixedCharLengthSpecifies the length of output character variables when the astore is used for scoring. The default value is 1024.
languageSpecifies the language used in the model. The default is 'ENGLISH'.
textSpecifies the name of the input text variable that the model will use for scoring. The default is '_text_'.
Data Preparation View data prep sheet
Data Setup

Ensure the textRuleDevelop action set is loaded and you have a compiled model table (e.g., 'concept_model_table') ready.

Copied!
1 
2PROC CAS;
3 
4SESSION casauto;
5LOADACTIONSET "textRuleDevelop";
6 
7RUN;
8 

Examples

Exports a compiled concept model from the input table 'concept_model_table' to an astore table named 'ConceptAstore'.

SAS® / CAS Code Code awaiting community validation
Copied!
1 
2PROC CAS;
3textRuleDevelop.exportTextModel / build={modelType="CONCEPT"} casOut={name="ConceptAstore"} TABLE={name="concept_model_table"};
4 
5RUN;
6 
Result :
The action creates a CAS table named 'ConceptAstore' containing the binary analytic store model.

Exports a category model with specific build options: using XML document type, weighted scoring algorithm, and creating a replaceable output astore.

SAS® / CAS Code Code awaiting community validation
Copied!
1 
2PROC CAS;
3textRuleDevelop.exportTextModel / build={modelType="CATEGORY", docType="XML", scoringAlgorithm="WEIGHTED"} casOut={name="CategoryAstore", replace=TRUE} TABLE={name="category_model_table"} fixedCharLength=2048 text="review_body";
4 
5RUN;
6 
Result :
A category astore named 'CategoryAstore' is created, configured to process XML data using a weighted algorithm, expecting an input column 'review_body'.

FAQ

What is the primary purpose of the exportTextModel action?
Which parameters are mandatory when running the exportTextModel action?
What are the valid values for the 'modelType' parameter within the 'build' parameter?
How does the 'litiChunkSize' parameter function for CONCEPT models?
What is the default behavior of 'outputTableMode' for a CATEGORY model?
What happens when 'outputTableMode' is set to "DATAGRID" for a SENTIMENT model?
What is the default language if the 'language' parameter is omitted?