Skip to content

Latest commit

 

History

History
72 lines (41 loc) · 1.69 KB

TextToGraph.md

File metadata and controls

72 lines (41 loc) · 1.69 KB

@accordproject/concerto-graphDocs


@accordproject/concerto-graph / TextToGraph

Class: TextToGraph

Converts natural language text to Graph Nodes and merges them into the knowlege graph.

Constructors

new TextToGraph()

new TextToGraph(graphModel, options): TextToGraph

Creates a new TextToGraph

Parameters

Parameter Type Description
graphModel GraphModel the graph model
options TextToGraphOptions the options for the text to graph conversion

Returns

TextToGraph

Source

TextToGraph.ts:19

Properties

Property Type
conversation Conversation
options TextToGraphOptions

Methods

mergeText()

mergeText(text): Promise<object>

Converts text to graph nodes and relationships and adds them to the knowlege graph

Parameters

Parameter Type Description
text string the text to extract nodes and relationships from

Returns

Promise<object>

an object that describes which nodes and relationships were added

nodes

nodes: string[]

relationships

relationships: string[]

Source

TextToGraph.ts:37