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 Extension Settings window.
The extension operation is divided into four phases:
- (Outside Studio) Prepare the files containing the specification of the changes to be made to the Knowledge Graph.
- Import the above files in your Studio project: source files are pre-processed to produce files with
.kge
extension inside the project'skge
folder which are suitable for the build operation. - Build the Knowledge Graph with the
.kge
files produced by the pre-processing referred to in the previous point. - 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 Extension Settings window:
- Select Add Import File .
- Select the
.txt
file to import. The Import into Knowledge Graph dialog will appear. - In KGE Filename enter the name to give to the corresponding pre-processed file (
.kge
extension). - In Separator select the character possibly used in your
.txt
files to separate multiple lemmas for the same syncon. -
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. -
In Definition enter the gloss for all the syncons listed in the file (all the syncons will have the same gloss)1.
- Check Copy in project folder to create a copy of your file in the
kge\source
folder of the project. - Select Import. The file is added to the imported files list and corresponding files with
.kge
and.import
extensions are created under the project'skge
folder. Also, thekge\main.kge
file is updated.
Import .csv files
To import a .csv
file, in the Knowledge Graph Extension Settings window:
- Select Add Import File .
- Select the
.csv
file to import. The Import into Knowledge Graph dialog will appear. - In KGE Filename enter the name to give to the corresponding pre-processed file (
.kge
extension). - In CSV type confirm EXT choice.
- Check Copy in project folder to create a copy of your file in the
kge\source
folder of the project. - Select Import. The file is added to the imported files list and corresponding files with
.kge
and.import
extensions are created under the project'skge
folder. Also, thekge\main.kge
file is updated.
Remove a file
To remove an imported file, in the Knowledge Graph Extension 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 Extension Settings window:
- Select a file.
-
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 Extension Settings window:
- Select the file.
- Select Reimport File .
Build the extended Knowledge Graph
- Select Build to build the extended Knowledge Graph. After the operation, a notification appears in the lower right corner of the Studio main window.
- 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 Extension Settings window:
- Select Reset. After the operation, a notification appears in the lower right corner of the Studio main window.
- Select the Reload Knowledge Graph link inside the notification.
-
Glosses may be invisible inside the Knowledge Graph and the Knowledge Graph Search tool windows depending on the type of Knowledge Graph. ↩