We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6d3bdbd commit 9a56e30Copy full SHA for 9a56e30
1 file changed
graphgen/bases/base_kg_builder.py
@@ -0,0 +1,27 @@
1
+from abc import ABC, abstractmethod
2
+from dataclasses import dataclass
3
+from typing import List
4
+
5
+from graphgen.bases.datatypes import Chunk
6
7
8
+@dataclass
9
+class BaseKGBuilder(ABC):
10
11
+ # node_types: List[str]
12
+ def build(self, chunks: List[Chunk]) -> None:
13
+ pass
14
15
+ @abstractmethod
16
+ def extract(self, chunk: Chunk) -> None:
17
18
19
+ # 摘要
20
+ def condense(self) -> None:
21
22
23
+ def _merge_nodes(self) -> None:
24
25
26
+ def _merge_edges(self) -> None:
27
0 commit comments