Skip to main content

internal/semantic

github.com/ensera-ai/taisce/internal/semantic · 1 files · 164 lines · 8 tests · source

Package semantic builds the text an entity is found by.

An entity is reached today by exact name match after normalisation — casing and whitespace and nothing else. That is deliberate: merging "the Dublin office" with "our Dublin site" needs either a similarity threshold nobody can justify or a model call per entity, and over-merging puts two people's facts on one node, which is a governance failure rather than a recall cost.

What it costs is a question that names something the way the conversation named it a second time. The entity is right there and the question misses it.

What this package is allowed to decide​

What text stands for an entity, and how much of it. It does not resolve, does not merge, and does not decide that two entities are one thing — that is still normalised name equality and nothing else. This produces a surface a question can be compared against, which is a way of finding CANDIDATES, and the irreversible direction stays closed.

It has no I/O and no model: a caller supplies the aliases and the stored quotes, and gets back the string to embed.

Where it sits​

Imports: none in this repository

Imported by: internal/infra/pg

Files​

FileLinesDeclarationsWhat it is for
surface.go1649Carries the package documentation.

8 tests hold this package's behaviour; the list is named for what each one proves.