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.
| Parameter | Description |
|---|---|
| build | Specifies the model type (CATEGORY, CONCEPT, or SENTIMENT) and its specific parameters, such as 'docType' or 'outputTableMode'. |
| casOut | Specifies the output table that will contain the generated analytic store (astore) model. |
| table | Specifies the input table that contains the compiled category, concept, or sentiment model to be exported. |
| fixedCharLength | Specifies the length of output character variables when the astore is used for scoring. The default value is 1024. |
| language | Specifies the language used in the model. The default is 'ENGLISH'. |
| text | Specifies the name of the input text variable that the model will use for scoring. The default is '_text_'. |
Ensure the textRuleDevelop action set is loaded and you have a compiled model table (e.g., 'concept_model_table') ready.
| 1 | |
| 2 | PROC CAS; |
| 3 | |
| 4 | SESSION casauto; |
| 5 | LOADACTIONSET "textRuleDevelop"; |
| 6 | |
| 7 | RUN; |
| 8 |
Exports a compiled concept model from the input table 'concept_model_table' to an astore table named 'ConceptAstore'.
| 1 | |
| 2 | PROC CAS; |
| 3 | textRuleDevelop.exportTextModel / build={modelType="CONCEPT"} casOut={name="ConceptAstore"} TABLE={name="concept_model_table"}; |
| 4 | |
| 5 | RUN; |
| 6 |
Exports a category model with specific build options: using XML document type, weighted scoring algorithm, and creating a replaceable output astore.
| 1 | |
| 2 | PROC CAS; |
| 3 | textRuleDevelop.exportTextModel / build={modelType="CATEGORY", docType="XML", scoringAlgorithm="WEIGHTED"} casOut={name="CategoryAstore", replace=TRUE} TABLE={name="category_model_table"} fixedCharLength=2048 text="review_body"; |
| 4 | |
| 5 | RUN; |
| 6 |