• This tool is currently only available for use on a Microsoft Windows server.
  • This tool is in beta and is currently experimental. Feedback is welcomed.

Introduction

This is a standalone extension available for CAST Imaging to generate an automated functional breakdown of your application(s). This breakdown is based on the code's wording, sentences and topics identified and correlated to the adherence of elements between them. Several factors can affect the module's outcomes, and it may need configured properly. Keep in mind that for some applications, the results may not be perfect, especially if the source code lacks understandable wording.

Technically, the extension contains a command line tool which (when run) will create an unpublished custom aggregation (called NLP Module) in your CAST Imaging Viewer instance for each targeted application. This custom aggregation is generated based on keywords found in your target application: related keywords will be grouped together as modules, and links will be created between the modules based on the underlying objects within the modules. This custom aggregation, when published, can be selected in the Perspective > Aggregated by section of the User Guide - GUI - Investigate panel for each targeted application.

Example custom aggregation:

Click to enlarge

Extension ID

com.castsoftware.imaging.nlpmodules

What is provided in the extension?

The extension is provided as a ZIP file. When unzipped, the following file (the command line tool) is available:

com.castsoftware.imaging.nlpmodules.<version>.exe

This tool should be run either from a command line window (CMD) opened with elevated permissions or you should write a batch script file (.bat) containing the required commands and run it with elevated permissions.

Compatibility

Operating System

Microsoft Windows(tick)
Linux(error)

CAST Imaging UI

The tool can be used with any ≥ 2.x release of CAST Imaging Viewer.

Prerequisites and information

Target tenantThe command line tool can currently only be run against a single tenant, in other words, ALL applications that have already been imported into CAST Imaging Viewer and are associated to the target tenant will be scanned and a custom aggregation will be created for each application found.
Host serverThe command line tool is currently designed to be run on the server hosting CAST Imaging Viewer.

Command line options

A full list of all available command line options is available by running the following command:

com.castsoftware.imaging.nlpmodules.<version>.exe -h

Running the tool

To run the tool on a server where the target instance of CAST Imaging Viewer is already installed (with all listening ports and installation folders set to their defaults) and against an entire tenant (i.e. all applications within the tenant), the following is the bare minimum command that you must use:

com.castsoftware.imaging.nlpmodules.<version>.exe --neo4j_database <my_tenant_database> --neo4j_import_location "<import_folder>" --trace_neo4j

Where:

CommandDescription
--neo4j_database=DATABASE

The name of the Neo4j database representing the tenant you are targeting. Note that the Neo4j database name is not always the same as the name of the tenant in the UI. For example, if the tenant name in the UI contains an underscore, this is not present in the Neo4j database name:

Name in the UI:

Name on disk:

Neo4j databases are stored by default in the following location and the "neo4j" folder corresponds to the "default" tenant that is provided with all instances of CAST Imaging UI:

%PROGRAMDATA%\CAST\ImagingSystem\Neo4j_data\databases
--neo4j_import_location=URI

The folder that is used by CAST Imaging UI when an application is uploaded or imported. By default this will be in the following location, unless you have customized the installation folders:

%PROGRAMDATA%\CAST\ImagingSystem\Neo4j_data\import
--trace_neo4jEnsures that a log is output to a .log file - this file will be stored in the same folder as the .exe file.

For example, targeting the "default" tenant (the "neo4j" database):

com.castsoftware.imaging.nlpmodules.<version>.exe --neo4j_database neo4j --neo4j_import_location "C:\ProgramData\CAST\ImagingSystem\Neo4j_data\import" --trace_neo4j

Additional commands are available:

CommandDescription
-neo4j_url=URI

If you have customized the listening ports for your installation of CAST Imaging  Viewer, specifically the "bolt" port for Neo4j which runs by default on port 7687, you will need to add in this additional option to define the custom port number:

--neo4j_url "bolt://localhost:<my_custom_port>"
-neo4j_user=USERUser to query and update the Neo4j database. Only required if this has been modified from the default.
-neo4j_password=PASSWORDPassword for selected user to query and update the Neo4j database. Only required if this has been modified from the default.
--application_list=APPLICATION_LISTLimit processing to selected APPLICATION_LIST in CAST Imaging Viewer (omit to process them all).
--min_community_size=MIN_COMMUNITY_SIZEFilter out communities with less than MIN_COMMUNITY_SIZE elements.
--min_module_size=MIN_MODULE_SIZEDo not publish modules with less than MIN_MODULE_SIZE objects.
--min_module_nb=MIN_MODULE_NBTry and build at least MIN_MODULE_NB modules.
--max_module_nb=MAX_MODULE_NBTry and build no more than MAX_MODULE_NB modules.
--source_list=SOURCE_LISTFeed on SOURCE_LIST list of text sources (among name, comment, mangling; omit to process them all).
--min_word_size=MIN_WORD_SIZEFilter out words with less than MIN_WORD_SIZE characters.
--pos_list=POS_LISTKeep words with POS in POS_LIST list of POS to keep (mostly among VERB, NOUN, ADJ, PROPN, ADV, NUM; omit to process VERB,NOUN,ADJ,PROPN).
--nlp_language=LANGUAGEUse LANGUAGE when extracting lemma (default is 'en', also supported: 'fr', 'de', 'it', 'es').
--trace_pandaTrace python panda dataframe handling.

What results can you expect?

For each application found in the target tenant, a custom aggregation (called NLP Module) will be generated. To access this custom aggregation, use the following icon (your login will need the ADMIN role):

If you would like other users without the ADMIN role to view this custom aggregation, you will need to grant them access. See Grant access to the custom aggregation mode in User Guide - Creating a custom aggregation mode.

For example:

This custom aggregation is unpublished. When published, it will become available to select in the Perspective > Aggregated by section of the User Guide - GUI - Investigate panel for all users that have permission to access the application (i.e ADMIN and non-ADMIN users):