knowledge graph
Browse files- knowledge.py +2 -2
knowledge.py
CHANGED
@@ -10,7 +10,7 @@ class Node(BaseModel, frozen=True):
|
|
10 |
Node representing concept in the subject domain
|
11 |
"""
|
12 |
id: int
|
13 |
-
label: str = Field(..., description = "description of the concept
|
14 |
color: str
|
15 |
|
16 |
class Edge(BaseModel, frozen=True):
|
@@ -24,7 +24,7 @@ class Edge(BaseModel, frozen=True):
|
|
24 |
|
25 |
class KnowledgeGraph(BaseModel):
|
26 |
"""
|
27 |
-
graph representation of subject domain
|
28 |
"""
|
29 |
nodes: List[Node] = Field(..., default_factory=list)
|
30 |
edges: List[Edge] = Field(..., default_factory=list)
|
|
|
10 |
Node representing concept in the subject domain
|
11 |
"""
|
12 |
id: int
|
13 |
+
label: str = Field(..., description = "description of the concept in the subject domain")
|
14 |
color: str
|
15 |
|
16 |
class Edge(BaseModel, frozen=True):
|
|
|
24 |
|
25 |
class KnowledgeGraph(BaseModel):
|
26 |
"""
|
27 |
+
graph representation of concepts in the subject domain
|
28 |
"""
|
29 |
nodes: List[Node] = Field(..., default_factory=list)
|
30 |
edges: List[Edge] = Field(..., default_factory=list)
|