(self, edges_threshold: float = DEFAULT_EDGES_THRESHOLD)
| 145 | """Builds and manages a knowledge graph from document chunks.""" |
| 146 | |
| 147 | def __init__(self, edges_threshold: float = DEFAULT_EDGES_THRESHOLD): |
| 148 | self.graph = nx.Graph() |
| 149 | self.lemmatizer = WordNetLemmatizer() |
| 150 | self.concept_cache = {} |
| 151 | self.nlp = self._load_spacy_model() |
| 152 | self.edges_threshold = edges_threshold |
| 153 | self._all_embeddings = [] |
| 154 | |
| 155 | def _load_spacy_model(self): |
| 156 | """Load spaCy model, downloading if necessary.""" |
nothing calls this directly
no test coverage detected