Entity Pipeline
class EntityPipeline
Pipeline for extracting and resolving entities from chunks.
This is a simpler alternative to PropositionPipeline when you only need entity extraction without proposition creation.
Example usage:
val pipeline = EntityPipeline
.withExtractor(LlmEntityExtractor.withLlm(llmOptions).withAi(ai))
val result = pipeline.processChunk(chunk, context)
entityRepository.saveAll(result.entitiesToPersist())Content copied to clipboard
This pipeline does NOT persist anything. It returns an EntityResults containing all extracted entities. The caller is responsible for persisting these to the appropriate repository.
Parameters
extractor
The entity extractor to use
Functions
Link copied to clipboard
fun process(chunks: List<<Error class: unknown class>>, context: SourceAnalysisContext): EntityResults
Process multiple chunks through the pipeline.
Link copied to clipboard
fun processChunk(chunk: <Error class: unknown class>, context: SourceAnalysisContext): ChunkEntityResult
Process a single chunk through the pipeline. Extracts entities and resolves them against the knowledge graph.