normalize

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: May 22, 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 multiple matching strategies to bridge different qualification levels:

  • Exact match after normalization
  • Terminal name match (last component after all dots)
  • Substring containment
  • Suffix match

func Symbol

func Symbol(raw string) string

Symbol canonicalizes a qualified symbol name for comparison.

Input formats handled:

  • knowing: "github.com/org/repo://path/to/file.py.ClassName.method"
  • GitNexus: "pkg/FuncName" or "pkg.FuncName"
  • Aider: "pkg/file.go:FuncName"
  • SCIP: "github.com/org/repo/pkg.FuncName."
  • grep: "file.go:42:func FuncName("
  • Python-style: "flask.app.Flask.before_request"

Output: the meaningful symbol identifier stripped of file paths and repo URLs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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