Skip to content


A graph is a representation system that uses nodes and arrows to represent relations between entities, considering this following triple structure : owner --predicate-> subject

Here, in NLS (Natural Language Structuration) output, a node in the graph can be :

  • a project : your Lettria platform project.
  • a document : a document you processed.
  • a card : a person, an animal, an object, a concrete thing that the document talks about.
  • an information : attribute, event, taste, social link, possessions ...

Arrows are used to represent the direction of the information.

Example 1

For "I have a dog", the outputed graph would be :

  graph TD;

Example 2

"I have your dog" :

  graph TD;

Example 3

"I saw your brown dog in my garden."

  graph TD;

Card node

A card in the KNWL graph (knowledge graph) is a graph node that represents an entity in your document : a person, an animal, an object, a concrete thing that the document talks about.

Data for each card node

u_id : card unique id time : card creation time lemma : card lemma categories : Lettria or client categosens for the card class_id : correspondance with platform ontology classes ids positions : card positions in text (sentence index, token index) plural : card is plural (bool) negation : negation on card (bool) is_perso : card categosens were mapped by the client (bool) attribute : attributes related to this card possessing : possessions related to this card social : social links related to this card event : events related to this card heritage : heritages related to this card taste : tastes related to this card link : links related to this card

Information node

An information in th KNWL graph is a graph node used to describe cards's properties and relations. This regroups attributes, event, taste, social link, possessions, heritage and links.

Information node by type

attribute : represent a property possessing : represent a possession relation event : represent an action heritage : represent a similarity relation between 2 cards taste : represent a positive, negative or neutral interest relation social : represent a social link between 2 cards link : represent a link between informations or card. Temporal, Localisation, Causality ...

Data for each information node

u_id : information unique id time : information creation time owner : list of information's owners, considering the following structure : owner--predicate->subject value : information's target, considering the following structure : owner--predicate->subject type : type of the value : string, bool, number, entity, card, attribute, possessing, ... temporality: information temporality : present / past / future intensity : information intensity (float) negation : information negation (bool) id_list : list of token's text position that triggered the information extra : extra metadata depending on information's type


NLS gather metadata coming from API Input and returns it into the KNWL graph.


We have the speaker information for each sentence of the document, and so, for each information in the KNWL graph. It also allows coreference reprocessing for converational documents such as telephonic conversations.

Document structure

Document path for each information in the KNWL graph. For structured documents with different chapters and sub parts, it can be usefull to know in which part the information was found. For example, lot of important informations can be found in the "Conclusion" chunk of the document.

Next steps