Skip to content

Extend the Knowledge Graph

Introduction

In Studio Enterprise Edition it is possible to extend the project's Knowledge Graph by adding syncons, relationships between existing syncons and user data to existing syncons. This functionality is not available for imported legacy projects.

You do this using the Knowledge Graph Editor Settings window.

The extension operation is divided into four phases:

  1. (Outside Studio) Prepare the files containing the specification of the changes to be made to the Knowledge Graph.
  2. Import the above files in your Studio project: source files are pre-processed to produce files with .kge extension inside the project's kge folder which are suitable for the build operation.
  3. Build the Knowledge Graph with the .kge files produced by the pre-processing referred to in the previous point.
  4. Reload the Knowledge Graph to make the extended KG available.

Source files preparation

Files with the .txt extension allow you to easily add entities (people, organizations, brands, products, etc.) to the Knowledge Graph. Files with the .csv extension allow for more operations.

Read the article in the appendix to learn how to prepare these files according to your needs.

Import .txt files

To import a .txt file, in the Knowledge Graph Editor Settings window:

  1. Select Add Import File .
  2. Select the .txt file to import. The Import into Knowledge Graph dialog will appear.
  3. In KGE Filename enter the name to give to the corresponding pre-processed file (.kge extension).
  4. In Separator select the character possibly used in your .txt files to separate multiple lemmas for the same syncon.
  5. Select the button representing a funnel to look for the parent syncon. The search dialog has the same properties of the Knowledge Graph Search tool window. Your selection will fill the Parent Syncon field.

    Info

    The parent syncon is the syncon to which the syncons of the entities created with the extension operation will be connected with the supernomen/subnomen link. Entities syncons will be "children" (subnomen) of the specified parent syncon.

  6. In Definition enter the gloss for all the syncons listed in the file (all the syncons will have the same gloss)1.

  7. Check Copy in project folder to create a copy of your file in the kge\source folder of the project.
  8. Select Import. The file is added to the imported files list and corresponding files with .kge and .import extensions are created under the project's kge folder. Also, the kge\main.kge file is updated.

Import .csv files

To import a .csv file, in the Knowledge Graph Editor Settings window:

  1. Select Add Import File .
  2. Select the .csv file to import. The Import into Knowledge Graph dialog will appear.
  3. In KGE Filename enter the name to give to the corresponding pre-processed file (.kge extension).
  4. In CSV type confirm EXT choice.
  5. Check Copy in project folder to create a copy of your file in the kge\source folder of the project.
  6. Select Import. The file is added to the imported files list and corresponding files with .kge and .import extensions are created under the project's kge folder. Also, the kge\main.kge file is updated.

Note

Some example files and Excel templates are already downloadable and ready to be used.

Remove a file

To remove an imported file, in the Knowledge Graph Editor Settings window, select the file from the list, then select Remove Import File .
Corresponding files with .kge and .import extensions inside the project's kge folder are deleted and the kge\main.kge file is updated.

Change the evaluation order

Pre-processed files—those with .kge extension in the project's kge folder—are evaluated one after the other during the build operation, using the same order in which they are listed in the Knowledge Graph Extension Settings window.

To change the order in which files are evaluated during the build operation, in the Knowledge Graph Editor Settings window:

  1. Select a file.
  2. Select Up to move the file up one step.

    Or:

    Select Down to move the file down one step.

Re-import a file

To re-import a sorce file after some changes, in the Knowledge Graph Editor Settings window:

  1. Select the file.
  2. Select Reimport File .

Build the extended Knowledge Graph

  1. Select Build to build the extended Knowledge Graph. After the operation, a notification appears in the lower right corner of the Studio main window.
  2. Select the Reload Knowledge Graph link inside the notification.

After reloading, the extended Knowledge Graph is available and the extensions are accessible via the Knowledge Graph and the Knowledge Graph Search tool windows.

Reset the Knowledge Graph

To reset the Knowledge Graph to its original state, that is to remove the extension, in the Knowledge Graph Editor Settings window:

  1. Select Reset Extensions. After the operation, a notification appears in the lower right corner of the Studio main window.
  2. Select the Reload Knowledge Graph link inside the notification.

  1. Glosses may be invisible inside the Knowledge Graph and the Knowledge Graph Search tool windows depending on the type of Knowledge Graph.