@accordproject/concerto-graph • Docs
@accordproject/concerto-graph / TextToGraph
Converts natural language text to Graph Nodes and merges them into the knowlege graph.
new TextToGraph(
graphModel
,options
):TextToGraph
Creates a new TextToGraph
Parameter | Type | Description |
---|---|---|
graphModel |
GraphModel |
the graph model |
options |
TextToGraphOptions |
the options for the text to graph conversion |
Property | Type |
---|---|
conversation |
Conversation |
options |
TextToGraphOptions |
mergeText(
text
):Promise
<object
>
Converts text to graph nodes and relationships and adds them to the knowlege graph
Parameter | Type | Description |
---|---|---|
text |
string |
the text to extract nodes and relationships from |
Promise
<object
>
an object that describes which nodes and relationships were added
nodes:
string
[]
relationships:
string
[]