Text Analysis - Save Variable(s) - First Category

From Q
Jump to: navigation, search

Save a variable to the data set containing the first category mentioned. Where there are multiple input categories, the first category of each will be saved as a separate variable.

This QScriptfeature saves the first categories from a Automatic Categorization - List of Items, Automatic Categorization - Unstructured Text, Automatic Categorization - Entity Extraction or Text Analysis - Advanced - Setup Text AnalysisInsert > Text Analysis > Automatic Categorization > List of Items/Unstructured Text/Entity Extraction or Insert > Text Analysis > Advanced > Setup Text Analysis output as a Pick One or Pick One - Multi questionNominal or Nominal - Multi variable set.

Technical Details

The variables created from this QScriptfeature may become invalid and need to be deleted and recreated if the output from Automatic Categorization - List of Items, Automatic Categorization - Unstructured Text, Automatic Categorization - Entity Extraction or Automatic Categorization - Advanced - Setup Text AnalysisInsert > Text Analysis > Automatic Categorization > List of Items/Unstructured Text/Entity Extraction or Insert > Text Analysis > Advanced > Setup Text Analysis has changed, either due to the input text variable being modified or the input settings modified.

This QScript requires version 5.5.1 to be executed.

Code

includeWeb('QScript Functions for Saving Text Analysis Variables');

saveTextAnalysisVariables('Save Variable(s) - First Category');