docs.intersystems.com
Home  /  Application Development: Analytics Options  /  Advanced Modeling for InterSystems IRIS Business Intelligence  /  Generating Secondary Cubes for Use with Text Analytics


Advanced Modeling for InterSystems IRIS Business Intelligence
Generating Secondary Cubes for Use with Text Analytics
[Back] 
InterSystems: The power behind what matters   
Search:  


This appendix assumes that you have added an NLP measure to a cube (and created NLP dimensions that use that measure), as described in the chapter Using Text Analytics in Cubes.” This appendix describes how to generate secondary cubes that analyze entity occurrences and dictionary matching results. Always build the main cube before building these cubes.
The approach in this appendix is an alternative to using plug-ins as described in Adding Measures to Quantify Entity Occurrences and Adding Measures to Quantify Matching Results,” in the chapter Using Text Analytics in Cubes.” Plug-ins are a better approach, because the secondary cubes must be rebuilt manually whenever the main cube is rebuilt or synchronized.
Also see Accessing the Samples Shown in This Book,” in the preface.
Entity Occurrence Cube
To generate a cube that represents entity occurrences, use the following command in the Terminal:
 d ##class(%iKnow.DeepSee.CubeUtils).CreateEOCube(cubename,measurename)
Where cubename is the name of the cube that contains an NLP measure, and measurename is the name of the NLP measure.
This method generates a read-only class that provides access to the entity occurrence data, for benefit of the cube class. The entity occurrence class is named BaseCubeClass.measurename.EntityOccurrence, where BaseCubeClass is the class name of the base cube class and measurename is the name of the NLP measure.
The method also generates the cube class: BaseCubeClass.measurename.EOCube. The new cube definition is as follows:
The following shows an example pivot table that uses the entity occurrence cube for the Aviation demo:
This pivot table is defined as follows:
This pivot table indicates, for example, that the entity airplane occurred 4980 times in the reports for events in the Airplane category.
Matching Results Cube
To generate a cube that represents matching results, use the following command in the Terminal:
 d ##class(%iKnow.DeepSee.CubeUtils).CreateMRCube(cubename,measurename)
Where cubename is the name of the cube that contains an NLP measure, and measurename is the name of the NLP measure.
This method generates a read-only class that provides access to the matching results data, for benefit of the cube class. The matching results class is named BaseCubeClass.measurename.MatchingResults, where BaseCubeClass is the class name of the base cube class and measurename is the name of the NLP measure.
This method also generates the cube class: BaseCubeClass.measurename.MRCube. The new cube definition is as follows:
The following shows an example pivot table that uses the matching results cube for the Aviation demo:
This pivot table is defined as follows:
This pivot table indicates, for example, that the sources of type Incident contain zero matches for the dictionary item fatal. In contrast, the sources of type Accident contain 106 matches for this dictionary item.