Coverage for src/lilbee/wiki/entity_extractor/ner_concepts_plus_llm_types.py: 100%

11 statements  

« prev     ^ index     » next       coverage.py v7.15.2, created at 2026-09-04 17:08 +0000

1"""NerConceptsExtractor plus an LLM-proposed domain type schema. 

2 

3Stub: the real implementation wraps ``NerConceptsExtractor`` and issues 

4one LLM call against a representative corpus sample to propose custom 

5entity types. Cached in ``wiki/_schema.yaml``. 

6""" 

7 

8from __future__ import annotations 

9 

10from typing import TYPE_CHECKING 

11 

12from lilbee.wiki.entity_extractor.base import ExtractedEntity 

13 

14if TYPE_CHECKING: 

15 from lilbee.core.config import Config 

16 from lilbee.data.store import SearchChunk 

17 from lilbee.providers.base import LLMProvider 

18 

19 

20class NerConceptsPlusLlmTypesExtractor: 

21 """NER + concepts with an LLM-proposed domain schema layered on top.""" 

22 

23 def __init__(self, provider: LLMProvider, config: Config) -> None: 

24 self._provider = provider 

25 self._config = config 

26 

27 def available(self) -> bool: 

28 return True 

29 

30 def extract(self, chunks: list[SearchChunk]) -> list[ExtractedEntity]: 

31 raise NotImplementedError("NerConceptsPlusLlmTypesExtractor.extract is not yet implemented")