normalize

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package normalize provides symbol name canonicalization for cross-system comparison. Different systems produce different formats for the same symbol. This package normalizes them to a common form for ground-truth matching.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MatchesGroundTruth

func MatchesGroundTruth(retrieved, groundTruth string) bool

MatchesGroundTruth checks if a retrieved symbol matches a ground truth entry. Uses normalized comparison with substring and suffix matching to handle different qualification levels across systems.

func Symbol

func Symbol(raw string) string

Symbol canonicalizes a qualified symbol name for comparison.

Input formats handled:

  • knowing: "github.com/org/repo/pkg.FuncName"
  • GitNexus: "pkg/FuncName" or "pkg.FuncName"
  • Aider: "pkg/file.go:FuncName"
  • SCIP: "github.com/org/repo/pkg.FuncName."
  • grep: "file.go:42:func FuncName("

Output: "package.SymbolName" or "package.Type.Method"

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL