Success

data class Success(val chunkId: String, val suggestedPropositions: SuggestedPropositions, val entityResolutions: Resolutions<SuggestedEntityResolution>, val propositions: List<Proposition>, val revisionResults: List<RevisionResult> = emptyList()) : ChunkPropositionResult

A chunk that was processed successfully.

Constructors

Link copied to clipboard
constructor(chunkId: String, suggestedPropositions: SuggestedPropositions, entityResolutions: Resolutions<SuggestedEntityResolution>, propositions: List<Proposition>, revisionResults: List<RevisionResult> = emptyList())

Properties

Link copied to clipboard
open override val chunkId: String

Id of the chunk this result originated from.

Link copied to clipboard

Statistics about entity extraction outcomes

Link copied to clipboard

Whether revision was enabled

Link copied to clipboard

Statistics about revision outcomes

Link copied to clipboard
open override val propositions: List<Proposition>

All propositions extracted (before any revision).

Link copied to clipboard

All propositions that need to be persisted after revision. Includes both new propositions and updates to existing ones:

Link copied to clipboard
open override val revisionResults: List<RevisionResult>

All revision results

Functions

Link copied to clipboard
open fun entitiesToPersist(): List<<Error class: unknown class>>

All entities that need to be persisted (new + updated). Does not include reference-only entities.

Link copied to clipboard
open fun infoString(verbose: Boolean?, indent: Int): String
Link copied to clipboard
open override fun newEntities(): List<<Error class: unknown class>>

Entities that are new (not matched to any existing entity). These should be saved to the entity repository.

Link copied to clipboard
open fun persist(propositionRepository: PropositionRepository, namedEntityDataRepository: <Error class: unknown class>)

Persist extracted entities and propositions to their respective repositories. Also creates structural relationships:

Link copied to clipboard
open fun persistCanonicalPropositions(propositionRepository: PropositionRepository, namedEntityDataRepository: <Error class: unknown class>): PropositionPersistenceResult

The first half of persistReturningCanonical: entities and propositions are saved, and nothing else happens. Saved means committed only when no transaction wraps the call; inside an ambient transaction the claims land with the caller's commit, not here.

Link copied to clipboard
open fun persistReturningCanonical(propositionRepository: PropositionRepository, namedEntityDataRepository: <Error class: unknown class>): PropositionPersistenceResult

Persist the same things persist does, and report which stored proposition each extracted one landed on.

Link copied to clipboard
Link copied to clipboard
open override fun referenceOnlyEntities(): List<<Error class: unknown class>>

Entities that were matched to known entities that should not be updated. These are typically entities managed by external services (e.g., the current user). They are referenced in propositions but not persisted during extraction.

Link copied to clipboard
open override fun updatedEntities(): List<<Error class: unknown class>>

Entities that were matched to existing entities and may have updated information. These should be updated in the entity repository.

Link copied to clipboard
open fun wireStructuralRelationships(persisted: PropositionPersistenceResult, namedEntityDataRepository: <Error class: unknown class>)

The second half of persistReturningCanonical: the chunk, proposition and entity edges, wired against the propositions the repository returned so every edge lands on a node the store actually holds.