Add Images to Entities
Background
During Named Entity Extraction, an image in a Sintelix document is represented by a link native:Image.img. To create an association between an entity and an image, create a connection between an instance of the entity (for example, tag:Person link) and the image link (native:Image).
Example
The ingested document is in Microsoft Word format and contains the following paragraph:
Create a new Entity Extraction Script, click Save & Test, then direct it to analyse the ingested document. The text graph for this paragraph looks like this:
Focusing on "tag" namespace:
Focusing on "native" namespace:
Since the Location entity and native image annotation are in the same textblock, a simple Entity Extraction Script can connect the two:
In this script, the two link ends named "location" and "image" have no significance. The connection needs to be in the "resource" namespace, and the name of the connection (here "Photo") will be displayed later.
Assign this script as a "Late Stage Entity Extraction Script" in your Document Processing configuration and re-process the document.
When the document is re-processed and "Sydney" text reference is clicked, the resource is shown below entity features:
When a network is built with this entity, the resource is used as a network icon:
Additionally, a custom Network Table View can show the image. To show it, create a new column and new field path ":resources.image.Photo" (where "Photo" is the connection name created by the script).
The photo will appear in the new column: