Skip to main content

normaliseName

@forge/monorepo


@forge/monorepo / backend/src / normaliseName

Function: normaliseName()

normaliseName(raw): string

Defined in: backend/src/knowledge/graph.ts:108

A name reduced to what makes two spellings the same thing.

Case, whitespace, separators and a leading article. That gets "the retry budget", "Retry Budget" and "retry-budget" to one entity, which is the merge AC-4 names.

What it deliberately does not do is anything cleverer. Stemming would merge "billing" with "bill"; embedding similarity would merge whatever the model of the week thinks is close and would stop being reproducible the moment that model changed. Both would make the graph unmeasurable, and the second would make it undebuggable too.

Parenthetical qualifiers survive as words, so "Ana (engineering)" and "Ana (sales)" stay distinct — which AC-4 asks for, and which a punctuation-stripping rule gets right only by accident. It is worth being explicit that this is why punctuation becomes a space rather than nothing.

Parameters

raw

string

Returns

string